mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-17 22:00:05 +00:00
Add environment variable override helper function
This allows FORCE_QT_GLES and SEPARATE_TEST_DECODER to override both true and false.
This commit is contained in:
@@ -550,9 +550,12 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
}
|
||||
|
||||
if (WMUtils::isRunningNvidiaProprietaryDriverX11() ||
|
||||
!WMUtils::supportsDesktopGLWithEGL() ||
|
||||
qEnvironmentVariableIntValue("FORCE_QT_GLES")) {
|
||||
bool forceGles;
|
||||
if (!Utils::getEnvironmentVariableOverride("FORCE_QT_GLES", &forceGles)) {
|
||||
forceGles = WMUtils::isRunningNvidiaProprietaryDriverX11() ||
|
||||
!WMUtils::supportsDesktopGLWithEGL();
|
||||
}
|
||||
if (forceGles) {
|
||||
// The Nvidia proprietary driver causes Qt to render a black window when using
|
||||
// the default Desktop GL profile with EGL. AS a workaround, we default to
|
||||
// OpenGL ES when running on Nvidia on X11.
|
||||
|
||||
Reference in New Issue
Block a user