Make the libretro frontend not crash on rumble-less frontends
This commit is contained in:
parent
ccc7d2e887
commit
620ee3cf51
@ -142,6 +142,8 @@ static void GB_update_keys_status(GB_gameboy_t *gb, unsigned port)
|
|||||||
|
|
||||||
static void rumble_callback(GB_gameboy_t *gb, double amplitude)
|
static void rumble_callback(GB_gameboy_t *gb, double amplitude)
|
||||||
{
|
{
|
||||||
|
if (!rumble.set_rumble_state) return;
|
||||||
|
|
||||||
if (gb == &gameboy[0]) {
|
if (gb == &gameboy[0]) {
|
||||||
rumble.set_rumble_state(0, RETRO_RUMBLE_STRONG, 65535 * amplitude);
|
rumble.set_rumble_state(0, RETRO_RUMBLE_STRONG, 65535 * amplitude);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user