From de4267fc992388f9e841a6427436d083166b49e0 Mon Sep 17 00:00:00 2001 From: volzhs Date: Tue, 25 Apr 2017 20:05:22 +0900 Subject: [PATCH] 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp index be28479f396..a43938c6612 100644 --- a/scene/main/scene_main_loop.cpp +++ b/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;