all repos — mgba @ 73c8a343a5c350f5693fc8c9d0cf34102b9dcec4

mGBA Game Boy Advance Emulator

Libretro: Add GBP rumble option
Vicki Pfau vi@endrift.com
Wed, 14 Oct 2020 21:22:49 -0700
commit

73c8a343a5c350f5693fc8c9d0cf34102b9dcec4

parent

888841fe8f2b206f1f6cb47b96e0c8ded9c6291c

2 files changed, 19 insertions(+), 0 deletions(-)

jump to
M src/platform/libretro/libretro.csrc/platform/libretro/libretro.c

@@ -142,6 +142,14 @@ mCoreConfigSetDefaultValue(&core->config, "idleOptimization", "detect");

} } +#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); }
M src/platform/libretro/libretro_core_options.hsrc/platform/libretro/libretro_core_options.h

@@ -174,6 +174,17 @@ },

"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 }, };