summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2020-12-17 10:06:50 +0100
committerGitHub <noreply@github.com>2020-12-17 10:06:50 +0100
commitf3dccf5891eb4279c57b36123b5f1ba89957a1c1 (patch)
treee74c71cd3309af13bb435e1bc87f3e3316c77f89 /main/main.cpp
parentaa64834f72082c3685b7826a5273323a6f6d4a40 (diff)
parent341b9cf15a6df3dae1ba6218b8545feec41fa728 (diff)
Merge pull request #44393 from Calinou/add-stdout-flush-project-setting
Add a project setting to enable stdout flushing in release builds
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index a824b53e5a..c492cfaad7 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1121,6 +1121,11 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
#endif
+ // 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("logging/file_logging/enable_file_logging", false);
// Only file logging by default on desktop platforms as logs can't be
// accessed easily on mobile/Web platforms (if at all).