GBA: Fix idle loop detection setting
Jeffrey Pfau jeffrey@endrift.com
Sun, 28 Feb 2016 22:47:38 -0800
4 files changed,
6 insertions(+),
5 deletions(-)
M
src/gba/gui/gui-runner.c
→
src/gba/gui/gui-runner.c
@@ -233,6 +233,7 @@ }
} // TODO: Do we need to load more defaults? mCoreConfigSetDefaultIntValue(&runner->core->config, "volume", 0x100); + mCoreConfigSetDefaultValue(&runner->core->config, "idleOptimization", "detect"); mCoreLoadConfig(runner->core); mCoreAutoloadSave(runner->core); if (runner->setup) {
M
src/platform/libretro/libretro.c
→
src/platform/libretro/libretro.c
@@ -78,11 +78,11 @@ var.key = "mgba_idle_optimization";
var.value = 0; if (environCallback(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) { if (strcmp(var.value, "Don't Remove") == 0) { - mCoreConfigSetDefaultIntValue(&core->config, "idleOptimization", IDLE_LOOP_IGNORE); + mCoreConfigSetDefaultValue(&core->config, "idleOptimization", "ignore"); } else if (strcmp(var.value, "Remove Known") == 0) { - mCoreConfigSetDefaultIntValue(&core->config, "idleOptimization", IDLE_LOOP_REMOVE); + mCoreConfigSetDefaultValue(&core->config, "idleOptimization", "remove"); } else if (strcmp(var.value, "Detect and Remove") == 0) { - mCoreConfigSetDefaultIntValue(&core->config, "idleOptimization", IDLE_LOOP_DETECT); + mCoreConfigSetDefaultValue(&core->config, "idleOptimization", "detect"); } }
M
src/platform/test/fuzz-main.c
→
src/platform/test/fuzz-main.c
@@ -54,7 +54,7 @@
struct mCore* core = GBACoreCreate(); core->init(core); mCoreInitConfig(core, "fuzz"); - mCoreConfigSetDefaultIntValue(&core->config, "idleOptimization", IDLE_LOOP_REMOVE); + mCoreConfigSetDefaultValue(&core->config, "idleOptimization", "remove"); struct mArguments args; bool parsed = parseArguments(&args, argc, argv, &subparser);
M
src/platform/test/perf-main.c
→
src/platform/test/perf-main.c
@@ -119,13 +119,13 @@ mCoreLoadFile(core, args.fname);
mCoreConfigInit(&core->config, "perf"); mCoreConfigLoad(&core->config); - mCoreConfigSetDefaultIntValue(&core->config, "idleOptimization", IDLE_LOOP_REMOVE); struct mCoreOptions opts = {}; mCoreConfigMap(&core->config, &opts); opts.audioSync = false; opts.videoSync = false; applyArguments(&args, NULL, &core->config); mCoreConfigLoadDefaults(&core->config, &opts); + mCoreConfigSetDefaultValue(&core->config, "idleOptimization", "detect"); mCoreLoadConfig(core); core->reset(core);