mirror of https://github.com/mgba-emu/mgba.git
Qt: Early painter abort
This commit is contained in:
parent
2700bf2c97
commit
c11392e77a
|
@ -285,7 +285,7 @@ void DisplayGL::stopDrawing() {
|
|||
m_isDrawing = false;
|
||||
m_hasStarted = false;
|
||||
CoreController::Interrupter interrupter(m_context);
|
||||
QMetaObject::invokeMethod(m_painter.get(), "stop", Qt::BlockingQueuedConnection);
|
||||
m_painter->stop();
|
||||
if (m_gl) {
|
||||
hide();
|
||||
}
|
||||
|
@ -685,6 +685,11 @@ void PainterGL::forceDraw() {
|
|||
}
|
||||
|
||||
void PainterGL::stop() {
|
||||
m_started = false;
|
||||
QMetaObject::invokeMethod(this, "doStop", Qt::BlockingQueuedConnection);
|
||||
}
|
||||
|
||||
void PainterGL::doStop() {
|
||||
m_drawTimer.stop();
|
||||
m_active = false;
|
||||
m_started = false;
|
||||
|
|
|
@ -135,6 +135,8 @@ public:
|
|||
void setMessagePainter(MessagePainter*);
|
||||
void enqueue(const uint32_t* backing);
|
||||
|
||||
void stop();
|
||||
|
||||
bool supportsShaders() const { return m_supportsShaders; }
|
||||
int glTex();
|
||||
|
||||
|
@ -148,7 +150,6 @@ public slots:
|
|||
void forceDraw();
|
||||
void draw();
|
||||
void start();
|
||||
void stop();
|
||||
void pause();
|
||||
void unpause();
|
||||
void resize(const QSize& size);
|
||||
|
@ -167,6 +168,9 @@ public slots:
|
|||
signals:
|
||||
void started();
|
||||
|
||||
private slots:
|
||||
void doStop();
|
||||
|
||||
private:
|
||||
void makeCurrent();
|
||||
void performDraw();
|
||||
|
|
Loading…
Reference in New Issue