all repos — mgba @ a43c465f9fe18b5959121b0fe6dd5cfc358e83c2

mGBA Game Boy Advance Emulator

GBA: Fall back to idle loop remove mode if already present
Jeffrey Pfau jeffrey@endrift.com
Wed, 24 Aug 2016 12:55:25 -0700
commit

a43c465f9fe18b5959121b0fe6dd5cfc358e83c2

parent

2ddb6d759a2ce99d6952023dfb888679d61053c1

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M src/gba/core.csrc/gba/core.c

@@ -134,7 +134,11 @@ gba->idleOptimization = IDLE_LOOP_IGNORE;

} else if (strcasecmp(idleOptimization, "remove") == 0) { gba->idleOptimization = IDLE_LOOP_REMOVE; } else if (strcasecmp(idleOptimization, "detect") == 0) { - gba->idleOptimization = IDLE_LOOP_DETECT; + if (gba->idleLoop == IDLE_LOOP_NONE) { + gba->idleOptimization = IDLE_LOOP_DETECT; + } else { + gba->idleOptimization = IDLE_LOOP_REMOVE; + } } }