all repos — mgba @ 24929909f28df24461e62f36e80f0a60675facd3

mGBA Game Boy Advance Emulator

Qt: Reload GL context on main thread after shutting down painter
Vicki Pfau vi@endrift.com
Tue, 14 May 2019 17:30:32 -0700
commit

24929909f28df24461e62f36e80f0a60675facd3

parent

945bc8fffe99d2cca5bfc646cffcb8c19fef52bb

1 files changed, 5 insertions(+), 0 deletions(-)

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

@@ -99,6 +99,11 @@ CoreController::Interrupter interrupter(m_context);

QMetaObject::invokeMethod(m_painter, "stop", Qt::BlockingQueuedConnection); m_drawThread->exit(); m_drawThread = nullptr; + + m_gl->context()->makeCurrent(); +#if defined(_WIN32) && defined(USE_EPOXY) + epoxy_handle_external_wglMakeCurrent(); +#endif } m_context.reset(); }