mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 08:17:59 +00:00
OpenGL: Windows - fall back to software renderer if OpenGL < 2.1
This commit is contained in:
parent
c20a0ef928
commit
c946905907
1 changed files with 15 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue