mirror of https://github.com/mgba-emu/mgba.git
Prevent bank switching when reloading CPU state
This commit is contained in:
parent
98c8b42b0f
commit
3c100a5e31
|
@ -51,7 +51,7 @@ void GBADeserialize(struct GBA* gba, struct GBASerializedState* state) {
|
|||
memcpy(gba->cpu.bankedRegisters, state->cpu.bankedRegisters, 6 * 7 * sizeof(int32_t));
|
||||
memcpy(gba->cpu.bankedSPSRs, state->cpu.bankedSPSRs, 6 * sizeof(int32_t));
|
||||
gba->cpu.executionMode = gba->cpu.cpsr.t ? MODE_THUMB : MODE_ARM;
|
||||
ARMSetPrivilegeMode(&gba->cpu, gba->cpu.cpsr.priv);
|
||||
gba->cpu.privilegeMode = gba->cpu.cpsr.priv;
|
||||
gba->cpu.memory->setActiveRegion(gba->cpu.memory, gba->cpu.gprs[ARM_PC]);
|
||||
|
||||
GBAMemoryDeserialize(&gba->memory, state);
|
||||
|
|
Loading…
Reference in New Issue