all repos — mgba @ 6c67389e9c84846dbaac59f468d785984d854067

mGBA Game Boy Advance Emulator

GBA: Fix idle loop detection setting
Jeffrey Pfau jeffrey@endrift.com
Sun, 28 Feb 2016 22:47:38 -0800
commit

6c67389e9c84846dbaac59f468d785984d854067

parent

5ee1dfcea7fb0de91b976e047053b8b1aace0d84

M src/gba/gui/gui-runner.csrc/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.csrc/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.csrc/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.csrc/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);