Prevent bank switching when reloading CPU state

This commit is contained in:
Jeffrey Pfau 2014-01-20 23:42:07 -08:00
parent 98c8b42b0f
commit 3c100a5e31
1 changed files with 1 additions and 1 deletions

View File

@ -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);