mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix idle loop detection setting
This commit is contained in:
parent
5ee1dfcea7
commit
6c67389e9c
|
@ -233,6 +233,7 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) {
|
||||||
}
|
}
|
||||||
// TODO: Do we need to load more defaults?
|
// TODO: Do we need to load more defaults?
|
||||||
mCoreConfigSetDefaultIntValue(&runner->core->config, "volume", 0x100);
|
mCoreConfigSetDefaultIntValue(&runner->core->config, "volume", 0x100);
|
||||||
|
mCoreConfigSetDefaultValue(&runner->core->config, "idleOptimization", "detect");
|
||||||
mCoreLoadConfig(runner->core);
|
mCoreLoadConfig(runner->core);
|
||||||
mCoreAutoloadSave(runner->core);
|
mCoreAutoloadSave(runner->core);
|
||||||
if (runner->setup) {
|
if (runner->setup) {
|
||||||
|
|
|
@ -78,11 +78,11 @@ static void _reloadSettings(void) {
|
||||||
var.value = 0;
|
var.value = 0;
|
||||||
if (environCallback(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) {
|
if (environCallback(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) {
|
||||||
if (strcmp(var.value, "Don't Remove") == 0) {
|
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) {
|
} 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) {
|
} else if (strcmp(var.value, "Detect and Remove") == 0) {
|
||||||
mCoreConfigSetDefaultIntValue(&core->config, "idleOptimization", IDLE_LOOP_DETECT);
|
mCoreConfigSetDefaultValue(&core->config, "idleOptimization", "detect");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ int main(int argc, char** argv) {
|
||||||
struct mCore* core = GBACoreCreate();
|
struct mCore* core = GBACoreCreate();
|
||||||
core->init(core);
|
core->init(core);
|
||||||
mCoreInitConfig(core, "fuzz");
|
mCoreInitConfig(core, "fuzz");
|
||||||
mCoreConfigSetDefaultIntValue(&core->config, "idleOptimization", IDLE_LOOP_REMOVE);
|
mCoreConfigSetDefaultValue(&core->config, "idleOptimization", "remove");
|
||||||
|
|
||||||
struct mArguments args;
|
struct mArguments args;
|
||||||
bool parsed = parseArguments(&args, argc, argv, &subparser);
|
bool parsed = parseArguments(&args, argc, argv, &subparser);
|
||||||
|
|
|
@ -119,13 +119,13 @@ int main(int argc, char** argv) {
|
||||||
mCoreConfigInit(&core->config, "perf");
|
mCoreConfigInit(&core->config, "perf");
|
||||||
mCoreConfigLoad(&core->config);
|
mCoreConfigLoad(&core->config);
|
||||||
|
|
||||||
mCoreConfigSetDefaultIntValue(&core->config, "idleOptimization", IDLE_LOOP_REMOVE);
|
|
||||||
struct mCoreOptions opts = {};
|
struct mCoreOptions opts = {};
|
||||||
mCoreConfigMap(&core->config, &opts);
|
mCoreConfigMap(&core->config, &opts);
|
||||||
opts.audioSync = false;
|
opts.audioSync = false;
|
||||||
opts.videoSync = false;
|
opts.videoSync = false;
|
||||||
applyArguments(&args, NULL, &core->config);
|
applyArguments(&args, NULL, &core->config);
|
||||||
mCoreConfigLoadDefaults(&core->config, &opts);
|
mCoreConfigLoadDefaults(&core->config, &opts);
|
||||||
|
mCoreConfigSetDefaultValue(&core->config, "idleOptimization", "detect");
|
||||||
mCoreLoadConfig(core);
|
mCoreLoadConfig(core);
|
||||||
|
|
||||||
core->reset(core);
|
core->reset(core);
|
||||||
|
|
Loading…
Reference in New Issue