mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-11 13:26:34 +00:00
Don't install 0-strength rumble effects.
This commit is contained in:
parent
9131e3819e
commit
0314a57577
@ -216,7 +216,7 @@ static bool udev_set_rumble(unsigned i, enum retro_rumble_effect effect, uint16_
|
||||
// Setting at init seems to work for pads which are hotplugged ...
|
||||
//
|
||||
// This approach might be cleaner in the end if we end up supporting configurable force feedback.
|
||||
if (!pad->has_set_ff[effect])
|
||||
if (!pad->has_set_ff[effect] && strength)
|
||||
{
|
||||
struct ff_effect e;
|
||||
memset(&e, 0, sizeof(e));
|
||||
@ -237,8 +237,8 @@ static bool udev_set_rumble(unsigned i, enum retro_rumble_effect effect, uint16_
|
||||
|
||||
pad->has_set_ff[effect] = true;
|
||||
pad->effects[effect] = e.id;
|
||||
pad->strength[effect] = strength;
|
||||
}
|
||||
pad->strength[effect] = strength;
|
||||
|
||||
if (strength)
|
||||
{
|
||||
@ -348,7 +348,6 @@ static int open_joystick(const char *path)
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
|
||||
unsigned long evbit[NBITS(EV_MAX)] = {0};
|
||||
unsigned long keybit[NBITS(KEY_MAX)] = {0};
|
||||
unsigned long absbit[NBITS(ABS_MAX)] = {0};
|
||||
@ -362,7 +361,6 @@ static int open_joystick(const char *path)
|
||||
if (!test_bit(EV_KEY, evbit))
|
||||
goto error;
|
||||
|
||||
|
||||
return fd;
|
||||
|
||||
error:
|
||||
@ -402,7 +400,6 @@ static bool add_pad(unsigned i, int fd, const char *path)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
RARCH_LOG("[udev]: Plugged pad: %s on port #%u.\n", pad->ident, i);
|
||||
|
||||
struct stat st;
|
||||
|
Loading…
x
Reference in New Issue
Block a user