mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix GL display not updating while paused
This commit is contained in:
parent
c0120cd586
commit
ca8559549c
|
@ -64,7 +64,6 @@ DisplayGL::DisplayGL(const QSurfaceFormat& format, QWidget* parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
m_painter = new PainterGL(windowHandle(), m_gl, forceVersion);
|
m_painter = new PainterGL(windowHandle(), m_gl, forceVersion);
|
||||||
setUpdatesEnabled(false); // Prevent paint events, which can cause race conditions
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayGL::~DisplayGL() {
|
DisplayGL::~DisplayGL() {
|
||||||
|
@ -475,8 +474,6 @@ void PainterGL::swap() {
|
||||||
}
|
}
|
||||||
if (!m_queue.isEmpty()) {
|
if (!m_queue.isEmpty()) {
|
||||||
QMetaObject::invokeMethod(this, "draw", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, "draw", Qt::QueuedConnection);
|
||||||
} else {
|
|
||||||
m_swapTimer.start();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ public slots:
|
||||||
void resizeContext() override;
|
void resizeContext() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void paintEvent(QPaintEvent*) override {}
|
virtual void paintEvent(QPaintEvent*) override { forceDraw(); }
|
||||||
virtual void resizeEvent(QResizeEvent*) override;
|
virtual void resizeEvent(QResizeEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue