Merge pull request #2919

c946905 OpenGL: Windows - fall back to software renderer if OpenGL < 2.1 (xiphon)
This commit is contained in:
luigi1111 2020-05-21 12:42:00 -05:00
commit e6c4c32d01
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -75,6 +75,10 @@
#include "daemon/DaemonManager.h"
#endif
#if defined(Q_OS_WIN)
#include <QOpenGLContext>
#endif
#ifdef WITH_SCANNER
#include "QR-Code-scanner/QrCodeScanner.h"
#endif
@ -179,6 +183,17 @@ int main(int argc, char *argv[])
MainApp app(argc, argv);
#if defined(Q_OS_WIN)
if (isOpenGL)
{
QOpenGLContext ctx;
isOpenGL = ctx.create() && ctx.format().version() >= qMakePair(2, 1);
if (!isOpenGL) {
qputenv("QMLSCENE_DEVICE", "softwarecontext");
}
}
#endif
app.setApplicationName("monero-core");
app.setOrganizationDomain("getmonero.org");
app.setOrganizationName("monero-project");