GBA: Only run idle loop detection outside of BIOS region
Jeffrey Pfau jeffrey@endrift.com
Sat, 17 Jan 2015 00:53:14 -0800
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
src/gba/gba-memory.c
→
src/gba/gba-memory.c
@@ -193,8 +193,8 @@ struct GBA* gba = (struct GBA*) cpu->master;
struct GBAMemory* memory = &gba->memory; int newRegion = address >> BASE_OFFSET; - if (gba->idleOptimization >= IDLE_LOOP_REMOVE) { - if (address == gba->lastJump && address == gba->idleLoop && memory->activeRegion != REGION_BIOS) { + if (gba->idleOptimization >= IDLE_LOOP_REMOVE && memory->activeRegion != REGION_BIOS) { + if (address == gba->lastJump && address == gba->idleLoop) { GBAHalt(gba); } else if (gba->idleOptimization >= IDLE_LOOP_DETECT && newRegion == memory->activeRegion) { if (address == gba->lastJump) {