GB Serialize: Fix switching speed modes when loading a state (fixes #2097)

This commit is contained in:
Vicki Pfau 2021-03-30 18:34:51 -07:00
parent fee8255611
commit 927b70e6fd
2 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,7 @@
0.9.1: (Future)
Emulation fixes:
- Core: Fix first event scheduling after loading savestate
- GB Serialize: Fix switching speed modes when loading a state (fixes mgba.io/i/2097)
- GBA Memory: Fix loading Thumb savestates when in ARM mode
Other fixes:
- GBA: Fix FireRed revision misdetecting as a ROM hack

View File

@ -172,6 +172,7 @@ bool GBDeserialize(struct GB* gb, const struct GBSerializedState* state) {
gb->cpu->condition = GBSerializedCpuFlagsGetCondition(flags);
gb->cpu->irqPending = GBSerializedCpuFlagsGetIrqPending(flags);
gb->doubleSpeed = GBSerializedCpuFlagsGetDoubleSpeed(flags);
gb->cpu->tMultiplier = 2 - gb->doubleSpeed;
gb->cpu->halted = GBSerializedCpuFlagsGetHalted(flags);
gb->cpuBlocked = GBSerializedCpuFlagsGetBlocked(flags);