diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-08 16:13:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-08 16:13:27 +0100 |
commit | 8af3d566310b32def773220167e796731b3c4124 (patch) | |
tree | 0b3d731268900348ec3c3cc013680b3d86b464e9 | |
parent | 14f330c95e0e95fa0162ce4ac227fe74afa5f268 (diff) | |
parent | ae850177a3cd4e285313728dfcb490753e2e7e82 (diff) |
Merge pull request #46792 from akien-mga/linux-fix-detect_prime-steam
Linux: Fix PRIME detection on Steam
-rw-r--r-- | platform/linuxbsd/display_server_x11.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp index d7f7054acb..3bc859e17d 100644 --- a/platform/linuxbsd/display_server_x11.cpp +++ b/platform/linuxbsd/display_server_x11.cpp @@ -4030,7 +4030,10 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode use_prime = 0; } - if (getenv("LD_LIBRARY_PATH")) { + // Some tools use fake libGL libraries and have them override the real one using + // LD_LIBRARY_PATH, so we skip them. *But* Steam also sets LD_LIBRARY_PATH for its + // runtime and includes system `/lib` and `/lib64`... so ignore Steam. + if (use_prime == -1 && getenv("LD_LIBRARY_PATH") && !getenv("STEAM_RUNTIME_LIBRARY_PATH")) { String ld_library_path(getenv("LD_LIBRARY_PATH")); Vector<String> libraries = ld_library_path.split(":"); |