From 55f0e1e1d593474f8a4198ff4ee278734b922c4b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 25 Aug 2018 11:59:32 -0700 Subject: [PATCH] Use QT_OPENGL to set ANGLE --- app/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/main.cpp b/app/main.cpp index 5992328b..dd424fb0 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -160,13 +160,18 @@ int main(int argc, char *argv[]) SDL_LogSetOutputFunction(sdlLogToDiskHandler, nullptr); #endif - QCoreApplication::setAttribute(Qt::AA_UseOpenGLES); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // This avoids using the default keychain for SSL, which may cause // password prompts on macOS. qputenv("QT_SSL_USE_TEMPORARY_KEYCHAIN", QByteArray("1")); +#ifdef Q_OS_WIN32 + // On Windows, use ANGLE so we don't have to load both DX and OGL + // user-mode drivers into our app. + qputenv("QT_OPENGL", "angle"); +#endif + // Set these here to allow us to use the default QSettings constructor QCoreApplication::setOrganizationName("Moonlight Game Streaming Project"); QCoreApplication::setOrganizationDomain("moonlight-stream.com");