Browse Source

Merge pull request #8530 from volzhs/auto-accept-quit-master

Fix auto_accept_quit option to work
Rémi Verschelde 8 năm trước cách đây
mục cha
commit
1a47087a73
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      scene/main/scene_main_loop.cpp

+ 2 - 2
scene/main/scene_main_loop.cpp

@@ -510,8 +510,6 @@ void SceneTree::input_event(const InputEvent &p_event) {
 void SceneTree::init() {
 
 	//_quit=false;
-	accept_quit = true;
-	quit_on_go_back = true;
 	initialized = true;
 	input_handled = false;
 
@@ -2266,6 +2264,8 @@ SceneTree::SceneTree() {
 
 	singleton = this;
 	_quit = false;
+	accept_quit = true;
+	quit_on_go_back = true;
 	initialized = false;
 #ifdef TOOLS_ENABLED
 	editor_hint = false;