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]() {
|
connect(&m_rewindTimer, &QTimer::timeout, [this]() {
|
||||||
GBARewind(&m_threadContext, 1);
|
GBARewind(&m_threadContext, 1);
|
||||||
emit rewound(&m_threadContext);
|
|
||||||
emit frameAvailable(m_drawContext);
|
emit frameAvailable(m_drawContext);
|
||||||
|
emit rewound(&m_threadContext);
|
||||||
});
|
});
|
||||||
m_rewindTimer.setInterval(100);
|
m_rewindTimer.setInterval(100);
|
||||||
|
|
||||||
@ -478,8 +478,8 @@ void GameController::rewind(int states) {
|
|||||||
GBARewind(&m_threadContext, states);
|
GBARewind(&m_threadContext, states);
|
||||||
}
|
}
|
||||||
threadContinue();
|
threadContinue();
|
||||||
emit rewound(&m_threadContext);
|
|
||||||
emit frameAvailable(m_drawContext);
|
emit frameAvailable(m_drawContext);
|
||||||
|
emit rewound(&m_threadContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::startRewinding() {
|
void GameController::startRewinding() {
|
||||||
@ -574,8 +574,8 @@ void GameController::loadState(int slot) {
|
|||||||
GBARunOnThread(&m_threadContext, [](GBAThread* context) {
|
GBARunOnThread(&m_threadContext, [](GBAThread* context) {
|
||||||
GameController* controller = static_cast<GameController*>(context->userData);
|
GameController* controller = static_cast<GameController*>(context->userData);
|
||||||
if (GBALoadState(context, context->stateDir, controller->m_stateSlot)) {
|
if (GBALoadState(context, context->stateDir, controller->m_stateSlot)) {
|
||||||
controller->stateLoaded(context);
|
|
||||||
controller->frameAvailable(controller->m_drawContext);
|
controller->frameAvailable(controller->m_drawContext);
|
||||||
|
controller->stateLoaded(context);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user