Qt: Fix deadlock while telling GL thread to stop
Jeffrey Pfau jeffrey@endrift.com
Sun, 09 Nov 2014 16:36:36 -0800
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
src/platform/qt/Display.cpp
→
src/platform/qt/Display.cpp
@@ -52,9 +52,13 @@ }
void Display::stopDrawing() { if (m_drawThread) { + GBAThreadInterrupt(m_context); + GBASyncSuspendDrawing(&m_context->sync); QMetaObject::invokeMethod(m_painter, "stop", Qt::BlockingQueuedConnection); m_drawThread->exit(); m_drawThread = nullptr; + GBASyncResumeDrawing(&m_context->sync); + GBAThreadContinue(m_context); } }