diff --git a/src/platform/libretro/libretro.c b/src/platform/libretro/libretro.c index 0d2d0e60b..6046dd929 100644 --- a/src/platform/libretro/libretro.c +++ b/src/platform/libretro/libretro.c @@ -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); } diff --git a/src/platform/libretro/libretro_core_options.h b/src/platform/libretro/libretro_core_options.h index 93e3ab3bd..b42655e11 100644 --- a/src/platform/libretro/libretro_core_options.h +++ b/src/platform/libretro/libretro_core_options.h @@ -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 }, };