From fc520d6e1ea8e0a6dc131bf79981faca1dfff56b Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 4 Oct 2020 18:10:47 -0700 Subject: [PATCH] Qt: Fix drawing on macOS break when using OpenGL (fixes #1899) --- CHANGES | 1 + src/platform/qt/DisplayGL.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index b2d6d55a7..6dd2f72d2 100644 --- a/CHANGES +++ b/CHANGES @@ -22,6 +22,7 @@ Other fixes: - Qt: Add dummy English translation file (fixes mgba.io/i/1469) - Qt: Fix Battle Chip view not displaying chips on some DPI settings - Qt: Fix camera image being upside-down sometimes (fixes mgba.io/i/829 again) + - Qt: Fix drawing on macOS break when using OpenGL (fixes mgba.io/i/1899) - mGUI: Fix closing down a game if an exit is signalled - mVL: Fix injecting accidentally draining non-injection buffer - VFS: Fix directory node listing on some filesystems diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index bee78fa3a..07057245b 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -145,7 +145,9 @@ void DisplayGL::pauseDrawing() { m_isDrawing = false; CoreController::Interrupter interrupter(m_context); QMetaObject::invokeMethod(m_painter, "pause", Qt::BlockingQueuedConnection); +#ifndef Q_OS_MAC setUpdatesEnabled(true); +#endif } } @@ -154,7 +156,9 @@ void DisplayGL::unpauseDrawing() { m_isDrawing = true; CoreController::Interrupter interrupter(m_context); QMetaObject::invokeMethod(m_painter, "unpause", Qt::BlockingQueuedConnection); +#ifndef Q_OS_MAC setUpdatesEnabled(false); +#endif } }