From a43c465f9fe18b5959121b0fe6dd5cfc358e83c2 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 24 Aug 2016 12:55:25 -0700 Subject: [PATCH] GBA: Fall back to idle loop remove mode if already present --- src/gba/core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gba/core.c b/src/gba/core.c index da3a71593..9423496a7 100644 --- a/src/gba/core.c +++ b/src/gba/core.c @@ -134,7 +134,11 @@ static void _GBACoreLoadConfig(struct mCore* core, const struct mCoreConfig* con } 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; + } } }