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 21d69fa02a
commit e25d595892
2 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,7 @@
0.10.0: (Future) 0.10.0: (Future)
Emulation fixes: Emulation fixes:
- Core: Fix first event scheduling after loading savestate - 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 - GBA Memory: Fix loading Thumb savestates when in ARM mode
Other fixes: Other fixes:
- GBA: Fix FireRed revision misdetecting as a ROM hack - 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->condition = GBSerializedCpuFlagsGetCondition(flags);
gb->cpu->irqPending = GBSerializedCpuFlagsGetIrqPending(flags); gb->cpu->irqPending = GBSerializedCpuFlagsGetIrqPending(flags);
gb->doubleSpeed = GBSerializedCpuFlagsGetDoubleSpeed(flags); gb->doubleSpeed = GBSerializedCpuFlagsGetDoubleSpeed(flags);
gb->cpu->tMultiplier = 2 - gb->doubleSpeed;
gb->cpu->halted = GBSerializedCpuFlagsGetHalted(flags); gb->cpu->halted = GBSerializedCpuFlagsGetHalted(flags);
gb->cpuBlocked = GBSerializedCpuFlagsGetBlocked(flags); gb->cpuBlocked = GBSerializedCpuFlagsGetBlocked(flags);