diff options
| author | xiphon <xiphon@protonmail.com> | 2020-05-20 12:09:01 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2020-05-20 13:45:16 +0000 |
| commit | c946905907789ed15691c0be76e0b06a06885b97 (patch) | |
| tree | 1068bf8691e805ba9d902946aab6829d060979df /src | |
| parent | c20a0ef9284b7b82fc144652d11a483eec046be6 (diff) | |
| download | monzero-gui-c946905907789ed15691c0be76e0b06a06885b97.tar.gz monzero-gui-c946905907789ed15691c0be76e0b06a06885b97.tar.xz monzero-gui-c946905907789ed15691c0be76e0b06a06885b97.zip | |
OpenGL: Windows - fall back to software renderer if OpenGL < 2.1
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/main.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp index 16d91b0a..5774e686 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -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"); |
