aboutsummaryrefslogtreecommitdiff
path: root/src/input_common/sdl/sdl_impl.cpp
diff options
context:
space:
mode:
authorNicolas Jallamion <dante38@free.fr>2021-07-20 10:00:07 +0200
committerGitHub <noreply@github.com>2021-07-20 04:00:07 -0400
commit6573ff64b4a400ca7afebcb30d4d2f326fcdf4f4 (patch)
tree986c81614ac984cb23e239da05d503b3fcea6b2d /src/input_common/sdl/sdl_impl.cpp
parent07073734ed3785d1dee487f0c898a645fbd5f03c (diff)
input/sdl_impl: fix rumble support on DualSense. (#6683)
- value return can be different 0, is not error is normal, error is only -1.
Diffstat (limited to 'src/input_common/sdl/sdl_impl.cpp')
-rw-r--r--src/input_common/sdl/sdl_impl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index 68672a92be..1656b85fbd 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -130,10 +130,10 @@ public:
if (sdl_controller) {
return SDL_GameControllerRumble(sdl_controller.get(), amp_low, amp_high,
- rumble_max_duration_ms) == 0;
+ rumble_max_duration_ms) != -1;
} else if (sdl_joystick) {
return SDL_JoystickRumble(sdl_joystick.get(), amp_low, amp_high,
- rumble_max_duration_ms) == 0;
+ rumble_max_duration_ms) != -1;
}
return false;