all repos — mgba @ 0cc8046121def54e9fbb29ff28c137b4f3909841

mGBA Game Boy Advance Emulator

Qt: Minor GL fixes
Vicki Pfau vi@endrift.com
Sat, 14 Sep 2019 22:59:00 -0700
commit

0cc8046121def54e9fbb29ff28c137b4f3909841

parent

1dc405db3829a6f5eaed21a034e5d0b7ed0c7f5a

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

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

@@ -116,6 +116,7 @@ #else

messagePainter()->resize(size(), isAspectRatioLocked(), devicePixelRatio()); #endif resizePainter(); + setUpdatesEnabled(false); } void DisplayGL::stopDrawing() {

@@ -124,12 +125,14 @@ m_isDrawing = false;

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

@@ -139,6 +142,7 @@ if (m_drawThread) {

m_isDrawing = false; CoreController::Interrupter interrupter(m_context); QMetaObject::invokeMethod(m_painter, "pause", Qt::BlockingQueuedConnection); + setUpdatesEnabled(true); } }

@@ -147,6 +151,7 @@ if (m_drawThread) {

m_isDrawing = true; CoreController::Interrupter interrupter(m_context); QMetaObject::invokeMethod(m_painter, "unpause", Qt::BlockingQueuedConnection); + setUpdatesEnabled(false); } }