mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Lakka/Nintendo Switch: disable rumble gain
Rumble gain breaks controlls on Nintendo Switch port of Lakka, probably
due to issue in the driver).
Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-06-switch_disable_rumble_gain.patch
This commit is contained in:
parent
44dcfb88b6
commit
0cf437e375
@ -151,6 +151,7 @@ error:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_LAKKA_SWITCH
|
||||||
static bool udev_set_rumble_gain(unsigned i, unsigned gain)
|
static bool udev_set_rumble_gain(unsigned i, unsigned gain)
|
||||||
{
|
{
|
||||||
struct input_event ie;
|
struct input_event ie;
|
||||||
@ -179,6 +180,7 @@ static bool udev_set_rumble_gain(unsigned i, unsigned gain)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char *path)
|
static int udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char *path)
|
||||||
{
|
{
|
||||||
@ -299,6 +301,7 @@ static int udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char
|
|||||||
p, path, pad->num_effects);
|
p, path, pad->num_effects);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_LAKKA_SWITCH
|
||||||
/* Set rumble gain here, if supported */
|
/* Set rumble gain here, if supported */
|
||||||
if (test_bit(FF_RUMBLE, ffbit))
|
if (test_bit(FF_RUMBLE, ffbit))
|
||||||
{
|
{
|
||||||
@ -307,6 +310,7 @@ static int udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char
|
|||||||
: DEFAULT_RUMBLE_GAIN;
|
: DEFAULT_RUMBLE_GAIN;
|
||||||
udev_set_rumble_gain(p, rumble_gain);
|
udev_set_rumble_gain(p, rumble_gain);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -790,7 +794,11 @@ input_device_driver_t udev_joypad = {
|
|||||||
udev_joypad_axis,
|
udev_joypad_axis,
|
||||||
udev_joypad_poll,
|
udev_joypad_poll,
|
||||||
udev_set_rumble,
|
udev_set_rumble,
|
||||||
|
#ifndef HAVE_LAKKA_SWITCH
|
||||||
udev_set_rumble_gain,
|
udev_set_rumble_gain,
|
||||||
|
#else
|
||||||
|
NULL,
|
||||||
|
#endif
|
||||||
udev_joypad_name,
|
udev_joypad_name,
|
||||||
"udev",
|
"udev",
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user