From a6a29f97fe5e41c1050577a63a50f9137fe43d88 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 16 Jun 2020 11:27:46 +0200 Subject: [PATCH] Add a suffix to the window title when running from a debug build Since projects started from the editor or exported in debug mode run slower than those exported in release mode, this should be clearly presented to the user. This partially addresses #20219. (cherry picked from commit a9c60007a9f7cacd690c09b7f74a5e6f190c5cfb) --- main/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main/main.cpp b/main/main.cpp index 712231fa0b8..1174079c5b7 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1825,7 +1825,14 @@ bool Main::start() { sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true)); String appname = ProjectSettings::get_singleton()->get("application/config/name"); appname = TranslationServer::get_singleton()->translate(appname); +#ifdef DEBUG_ENABLED + // Append a suffix to the window title to denote that the project is running + // from a debug build (including the editor). Since this results in lower performance, + // this should be clearly presented to the user. + OS::get_singleton()->set_window_title(vformat("%s (DEBUG)", appname)); +#else OS::get_singleton()->set_window_title(appname); +#endif int shadow_atlas_size = GLOBAL_GET("rendering/quality/shadow_atlas/size"); int shadow_atlas_q0_subdiv = GLOBAL_GET("rendering/quality/shadow_atlas/quadrant_0_subdiv");