GBA: Fall back to idle loop remove mode if already present

This commit is contained in:
Jeffrey Pfau 2016-08-24 12:55:25 -07:00
parent 2ddb6d759a
commit a43c465f9f
1 changed files with 5 additions and 1 deletions

View File

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