Browse Source

Move the buglist override to as early as possible, include switches for specific rendering backends on windows

QGC4.4
Nate Weibley 9 years ago
parent
commit
91c050b9c9
  1. 2
      deploy/qgroundcontrol_installer.nsi
  2. 13
      src/main.cc

2
deploy/qgroundcontrol_installer.nsi

@ -70,6 +70,8 @@ Section "create Start Menu Shortcuts" @@ -70,6 +70,8 @@ Section "create Start Menu Shortcuts"
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\QGroundControl (GPU Compatibility Mode).lnk" "$INSTDIR\qgroundcontrol.exe" "-angle" "$INSTDIR\qgroundcontrol.exe" 0
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\QGroundControl (GPU Safe Mode).lnk" "$INSTDIR\qgroundcontrol.exe" "-swrast" "$INSTDIR\qgroundcontrol.exe" 0
SectionEnd
Function .onInit

13
src/main.cc

@ -139,9 +139,17 @@ int main(int argc, char *argv[]) @@ -139,9 +139,17 @@ int main(int argc, char *argv[])
#endif
#endif
// install the message handler
#ifdef Q_OS_WIN
// install the message handler
qInstallMessageHandler(msgHandler);
// Set our own OpenGL buglist
qputenv("QT_OPENGL_BUGLIST", ":/opengl/resources/opengl/buglist.json");
if (QCoreApplication::arguments().contains(QStringLiteral("-angle"))) {
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
} else if (QCoreApplication::arguments().contains(QStringLiteral("-swrast"))) {
QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
}
#endif
// The following calls to qRegisterMetaType are done to silence debug output which warns
@ -204,9 +212,6 @@ int main(int argc, char *argv[]) @@ -204,9 +212,6 @@ int main(int argc, char *argv[])
DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX);
SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX);
}
// Set our own OpenGL buglist
qputenv("QT_OPENGL_BUGLIST", ":/opengl/resources/opengl/buglist.json");
#endif
#endif // QT_DEBUG

Loading…
Cancel
Save