From 3c100a5e310f6031fb156cd8d9da262d6d1da663 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 20 Jan 2014 23:42:07 -0800 Subject: [PATCH] Prevent bank switching when reloading CPU state --- src/gba/gba-serialize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gba/gba-serialize.c b/src/gba/gba-serialize.c index 42cc90054..dabcf072b 100644 --- a/src/gba/gba-serialize.c +++ b/src/gba/gba-serialize.c @@ -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);