summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-03-01 09:19:15 +0100
committerGitHub <noreply@github.com>2021-03-01 09:19:15 +0100
commit947f22a90b808db1d419a7cc4844c6ae11a29efb (patch)
tree9b6f9cd09baf90028d4f3ebf317b44ab93da0927 /main/main.cpp
parentfb8cfc442d5bfb8f14e98006a734cdf551a0f2b1 (diff)
parent89283b7b53d2e2b118cf5afe6d90f0813d37a204 (diff)
Merge pull request #46532 from kuruk-mm/improve_flush
Logger: Cache 'flush_stdout_on_print' to improve performance, and wor…
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp
index e9b06f6b07..884caab1e9 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -538,8 +538,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
// Only flush stdout in debug builds by default, as spamming `print()` will
// decrease performance if this is enabled.
- GLOBAL_DEF("application/run/flush_stdout_on_print", false);
- GLOBAL_DEF("application/run/flush_stdout_on_print.debug", true);
+ GLOBAL_DEF_RST("application/run/flush_stdout_on_print", false);
+ GLOBAL_DEF_RST("application/run/flush_stdout_on_print.debug", true);
GLOBAL_DEF("debug/settings/crash_handler/message",
String("Please include this when reporting the bug on https://github.com/godotengine/godot/issues"));
@@ -1174,6 +1174,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
_print_line_enabled = false;
}
+ Logger::set_flush_stdout_on_print(ProjectSettings::get_singleton()->get("application/run/flush_stdout_on_print"));
+
OS::get_singleton()->set_cmdline(execpath, main_args);
GLOBAL_DEF("rendering/driver/driver_name", "Vulkan");