mirror of https://github.com/mgba-emu/mgba.git
Qt: Don't attempt to create a GL2 context if GL2 is disabled
This commit is contained in:
parent
b8b494eea6
commit
425baa1773
|
@ -27,6 +27,7 @@ Display* Display::create(QWidget* parent) {
|
|||
switch (s_driver) {
|
||||
#if defined(BUILD_GL) || defined(BUILD_GLES2) || defined(USE_EPOXY)
|
||||
case Driver::OPENGL:
|
||||
#if defined(BUILD_GLES2) || defined(USE_EPOXY)
|
||||
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES) {
|
||||
format.setVersion(2, 0);
|
||||
} else {
|
||||
|
@ -47,6 +48,7 @@ Display* Display::create(QWidget* parent) {
|
|||
}
|
||||
return new DisplayGL(format, parent);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef BUILD_GL
|
||||
case Driver::OPENGL1:
|
||||
format.setVersion(1, 4);
|
||||
|
|
Loading…
Reference in New Issue