mirror of https://github.com/encounter/SDL.git
Fixed updating the rumble parameters on Linux
This commit is contained in:
parent
b0c48dd9dd
commit
708ad1fd8d
|
@ -814,7 +814,6 @@ LINUX_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint1
|
||||||
{
|
{
|
||||||
struct input_event event;
|
struct input_event event;
|
||||||
|
|
||||||
if (joystick->hwdata->effect.id < 0) {
|
|
||||||
if (joystick->hwdata->ff_rumble) {
|
if (joystick->hwdata->ff_rumble) {
|
||||||
struct ff_effect *effect = &joystick->hwdata->effect;
|
struct ff_effect *effect = &joystick->hwdata->effect;
|
||||||
|
|
||||||
|
@ -834,7 +833,6 @@ LINUX_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint1
|
||||||
} else {
|
} else {
|
||||||
return SDL_Unsupported();
|
return SDL_Unsupported();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (ioctl(joystick->hwdata->fd, EVIOCSFF, &joystick->hwdata->effect) < 0) {
|
if (ioctl(joystick->hwdata->fd, EVIOCSFF, &joystick->hwdata->effect) < 0) {
|
||||||
return SDL_SetError("Couldn't update rumble effect: %s", strerror(errno));
|
return SDL_SetError("Couldn't update rumble effect: %s", strerror(errno));
|
||||||
|
|
Loading…
Reference in New Issue