Skip to content

Commit

Permalink
Merge pull request #2919
Browse files Browse the repository at this point in the history
c946905 OpenGL: Windows - fall back to software renderer if OpenGL < 2.1 (xiphon)
  • Loading branch information
luigi1111 committed May 21, 2020
2 parents e36d4a9 + c946905 commit e6c4c32
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit e6c4c32

Please sign in to comment.