all repos — mgba @ 8ff8876e3724981739d1343223eb2347a0b28810

mGBA Game Boy Advance Emulator

Qt: Block a bug whereby undoing a save can overwrite the wrong save
Jeffrey Pfau jeffrey@endrift.com
Thu, 16 Jul 2015 23:50:33 -0700
commit

8ff8876e3724981739d1343223eb2347a0b28810

parent

f05cc8d139001e952e89b0c623ed10be48487a29

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -559,8 +559,9 @@ threadContinue();

} void GameController::loadState(int slot) { - if (slot > 0) { + if (slot > 0 && slot != m_stateSlot) { m_stateSlot = slot; + m_backupSaveState.clear(); } GBARunOnThread(&m_threadContext, [](GBAThread* context) { GameController* controller = static_cast<GameController*>(context->userData);