mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix screen not redrawing when loading a state
This commit is contained in:
parent
0aef1bc6df
commit
697b550b37
|
@ -152,8 +152,8 @@ GameController::GameController(QObject* parent)
|
|||
|
||||
connect(&m_rewindTimer, &QTimer::timeout, [this]() {
|
||||
GBARewind(&m_threadContext, 1);
|
||||
emit rewound(&m_threadContext);
|
||||
emit frameAvailable(m_drawContext);
|
||||
emit rewound(&m_threadContext);
|
||||
});
|
||||
m_rewindTimer.setInterval(100);
|
||||
|
||||
|
@ -478,8 +478,8 @@ void GameController::rewind(int states) {
|
|||
GBARewind(&m_threadContext, states);
|
||||
}
|
||||
threadContinue();
|
||||
emit rewound(&m_threadContext);
|
||||
emit frameAvailable(m_drawContext);
|
||||
emit rewound(&m_threadContext);
|
||||
}
|
||||
|
||||
void GameController::startRewinding() {
|
||||
|
@ -574,8 +574,8 @@ void GameController::loadState(int slot) {
|
|||
GBARunOnThread(&m_threadContext, [](GBAThread* context) {
|
||||
GameController* controller = static_cast<GameController*>(context->userData);
|
||||
if (GBALoadState(context, context->stateDir, controller->m_stateSlot)) {
|
||||
controller->stateLoaded(context);
|
||||
controller->frameAvailable(controller->m_drawContext);
|
||||
controller->stateLoaded(context);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue