diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp index 00c6b1fecd..e5d2ea3922 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1677,10 +1677,21 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->_allow_hidpi = GLOBAL_DEF("display/window/dpi/allow_hidpi", true); OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false); +#ifdef TOOLS_ENABLED if (editor || project_manager) { - // The editor and project manager always detect and use hiDPI if needed + // The editor and project manager always detect and use hiDPI if needed. OS::get_singleton()->_allow_hidpi = true; + // Disable Vulkan overlays in editor, they cause various issues. + OS::get_singleton()->set_environment("DISABLE_MANGOHUD", "1"); // GH-57403. + OS::get_singleton()->set_environment("DISABLE_RTSS_LAYER", "1"); // GH-57937. + OS::get_singleton()->set_environment("DISABLE_VKBASALT", "1"); + } else { + // Re-allow using Vulkan overlays, disabled while using the editor. + OS::get_singleton()->unset_environment("DISABLE_MANGOHUD"); + OS::get_singleton()->unset_environment("DISABLE_RTSS_LAYER"); + OS::get_singleton()->unset_environment("DISABLE_VKBASALT"); } +#endif if (rtm == -1) { rtm = GLOBAL_DEF("rendering/driver/threads/thread_model", OS::RENDER_THREAD_SAFE); @@ -2114,7 +2125,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { #endif } -#ifdef TOOLS_ENABLED +#if defined(TOOLS_ENABLED) && defined(MACOS_ENABLED) if (OS::get_singleton()->get_bundle_icon_path().is_empty()) { Ref<Image> icon = memnew(Image(app_icon_png)); DisplayServer::get_singleton()->set_icon(icon); |