From 6573ff64b4a400ca7afebcb30d4d2f326fcdf4f4 Mon Sep 17 00:00:00 2001
From: Nicolas Jallamion <dante38@free.fr>
Date: Tue, 20 Jul 2021 10:00:07 +0200
Subject: input/sdl_impl: fix rumble support on DualSense. (#6683)

- value return can be different 0, is not error is normal, error is only -1.
---
 src/input_common/sdl/sdl_impl.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/input_common/sdl/sdl_impl.cpp')

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;
-- 
cgit v1.2.3-70-g09d2