diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-19 10:10:17 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-19 10:10:17 +0100 |
commit | cd0a9ccdfde05963d1b544b773662149f585da0d (patch) | |
tree | f121f1d2b279953e41c47e42cc8f879ce0695679 /main/main.cpp | |
parent | 4679f8724a3730c63bee36f44b7699b0a550bc14 (diff) | |
parent | 12817543a9e55b132da252a55f08ab11f9a02724 (diff) |
Merge pull request #71515 from akien-mga/disable-mangohud-editor
Force disable Vulkan overlays in the editor and project manager
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index 4a73d7ab8c..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); |