mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix rewind boundary conditions
This commit is contained in:
parent
24fc26d560
commit
5c699e9d6c
|
@ -264,7 +264,7 @@ void GBARewind(struct GBAThread* thread, int nStates) {
|
|||
if (!state) {
|
||||
return;
|
||||
}
|
||||
thread->rewindBufferSize -= nStates;
|
||||
thread->rewindBufferWriteOffset = (offset + thread->rewindBufferCapacity - nStates) % thread->rewindBufferCapacity;
|
||||
thread->rewindBufferSize -= nStates - 1;
|
||||
thread->rewindBufferWriteOffset = (offset + 1) % thread->rewindBufferCapacity;
|
||||
GBADeserialize(thread->gba, state);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue