Libretro: Add GBP rumble option

This commit is contained in:
Vicki Pfau 2020-10-14 21:22:49 -07:00
parent 888841fe8f
commit 73c8a343a5
2 changed files with 19 additions and 0 deletions

View File

@ -142,6 +142,14 @@ static void _reloadSettings(void) {
}
}
#ifdef M_CORE_GBA
var.key = "mgba_force_gbp";
var.value = 0;
if (environCallback(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) {
mCoreConfigSetDefaultIntValue(&core->config, "gba.forceGbp", strcmp(var.value, "ON") == 0);
}
#endif
mCoreConfigLoadDefaults(&core->config, &opts);
mCoreLoadConfig(core);
}

View File

@ -174,6 +174,17 @@ struct retro_core_option_definition option_defs_us[] = {
"OFF"
},
#endif
{
"mgba_force_gbp",
"Enable Game Boy Player Rumble (requires restart)",
"Enabling this will allow compatible games with the Game Boy Player boot logo to make the controller rumble. Due to how Nintendo decided this feature should work, it may cause glitches such as flickering or lag in some of these games.",
{
{ "OFF", NULL },
{ "ON", NULL },
{ NULL, NULL },
},
"OFF"
},
{ NULL, NULL, NULL, {{0}}, NULL },
};