mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix attempting to rewind when game isn't loaded
This commit is contained in:
parent
1462ffe7d5
commit
e82c050a7d
|
@ -640,7 +640,7 @@ void GameController::rewind(int states) {
|
|||
}
|
||||
|
||||
void GameController::startRewinding() {
|
||||
if (!m_gameOpen) {
|
||||
if (!isLoaded()) {
|
||||
return;
|
||||
}
|
||||
if (m_multiplayer && m_multiplayer->attached() > 1) {
|
||||
|
@ -654,6 +654,9 @@ void GameController::startRewinding() {
|
|||
}
|
||||
|
||||
void GameController::stopRewinding() {
|
||||
if (!isLoaded()) {
|
||||
return;
|
||||
}
|
||||
mCoreThreadSetRewinding(&m_threadContext, false);
|
||||
bool signalsBlocked = blockSignals(true);
|
||||
setPaused(m_wasPaused);
|
||||
|
|
Loading…
Reference in New Issue