all repos — mgba @ 54de0447168f51044c2cd2a67b9a28ad6d87f67e

mGBA Game Boy Advance Emulator

Qt: Fix non-GL1 build
Jeffrey Pfau jeffrey@endrift.com
Thu, 05 Nov 2015 22:29:48 -0800
commit

54de0447168f51044c2cd2a67b9a28ad6d87f67e

parent

28dff01b833bbe0fddaa20a0e94983981f083c01

1 files changed, 6 insertions(+), 3 deletions(-)

jump to
M src/platform/qt/DisplayGL.cppsrc/platform/qt/DisplayGL.cpp

@@ -160,6 +160,7 @@ , m_started(false)

, m_context(nullptr) , m_shaders(nullptr) , m_nShaders(0) + , m_backend(nullptr) , m_messagePainter(nullptr) { #ifdef BUILD_GL

@@ -175,15 +176,17 @@ gl2Backend = new GBAGLES2Context;

GBAGLES2ContextCreate(gl2Backend); m_backend = &gl2Backend->d; m_supportsShaders = true; - } else { -#else - { + } #endif + +#ifdef BUILD_GL + if (!m_backend) { glBackend = new GBAGLContext; GBAGLContextCreate(glBackend); m_backend = &glBackend->d; m_supportsShaders = false; } +#endif m_backend->swap = [](VideoBackend* v) { PainterGL* painter = static_cast<PainterGL*>(v->user); painter->m_gl->swapBuffers();