all repos — mgba @ ca8559549c2b77b5adb958557c3a6c9d6ebc5d47

mGBA Game Boy Advance Emulator

Qt: Fix GL display not updating while paused
Vicki Pfau vi@endrift.com
Thu, 04 Jul 2019 14:13:27 -0700
commit

ca8559549c2b77b5adb958557c3a6c9d6ebc5d47

parent

c0120cd58608da068d1218796a02f2f3468608b0

2 files changed, 1 insertions(+), 4 deletions(-)

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

@@ -64,7 +64,6 @@ m_gl->create();

} m_painter = new PainterGL(windowHandle(), m_gl, forceVersion); - setUpdatesEnabled(false); // Prevent paint events, which can cause race conditions } DisplayGL::~DisplayGL() {

@@ -475,8 +474,6 @@ m_needsUnlock = false;

} if (!m_queue.isEmpty()) { QMetaObject::invokeMethod(this, "draw", Qt::QueuedConnection); - } else { - m_swapTimer.start(); } }
M src/platform/qt/DisplayGL.hsrc/platform/qt/DisplayGL.h

@@ -60,7 +60,7 @@ void clearShaders() override;

void resizeContext() override; protected: - virtual void paintEvent(QPaintEvent*) override {} + virtual void paintEvent(QPaintEvent*) override { forceDraw(); } virtual void resizeEvent(QResizeEvent*) override; private: