mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix rewind boundary conditions
This commit is contained in:
parent
c0c4d21b68
commit
d0f4584f74
|
@ -262,7 +262,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