Disable ReShade in the editor and project manager (if run via Vulkan)

ReShade can still be used on projects run from the editor as well
as exported projects.

This avoids several issues:

- ReShade doesn't play well with low-processor mode, making it hard
  to use unless the Update Continuously editor setting is enabled.
- The ReShade overlay appears on every popup opened, which made popups
  unusable.
- If you use a ReShade configuration that heavily affects the image,
  it won't affect the editor UI which may become unreadable as a result.

This doesn't affect the editor being run via OpenGL or Direct3D 12
as ReShade is injected in a different manner when using those graphics
APIs.

(cherry picked from commit 67b8d71c79)
This commit is contained in:
Hugo Locurcio 2024-02-14 06:30:20 +01:00 committed by Rémi Verschelde
parent a51db95bc4
commit 20595c1e5e
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 0 deletions

View File

@ -2020,11 +2020,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
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");
OS::get_singleton()->set_environment("DISABLE_VK_LAYER_reshade_1", "1"); // GH-70849.
} 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");
OS::get_singleton()->unset_environment("DISABLE_VK_LAYER_reshade_1");
}
#endif