From edefaa768b861023adc52bc83d50e403ea7143d8 Mon Sep 17 00:00:00 2001 From: volzhs Date: Tue, 25 Apr 2017 19:54:08 +0900 Subject: Fix auto_accept_quit option to work auto_accept_quit value is set first properly with GLOBAL_DEF("application/auto_accept_quit", true) in main.cpp after that it's reset to true in SceneTree:init() whatever value was. --- scene/main/scene_main_loop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp index 3a000c765..3c14b48ca 100644 --- a/scene/main/scene_main_loop.cpp +++ b/scene/main/scene_main_loop.cpp @@ -460,7 +460,6 @@ void SceneTree::input_event(const InputEvent &p_event) { void SceneTree::init() { //_quit=false; - accept_quit = true; initialized = true; input_handled = false; @@ -1625,6 +1624,7 @@ SceneTree::SceneTree() { singleton = this; _quit = false; + accept_quit = true; initialized = false; #ifdef TOOLS_ENABLED editor_hint = false; -- cgit v1.2.3-70-g09d2