summaryrefslogtreecommitdiff
path: root/src/input_common/sdl
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/sdl')
-rw-r--r--src/input_common/sdl/sdl_impl.cpp4
-rw-r--r--src/input_common/sdl/sdl_impl.h8
2 files changed, 2 insertions, 10 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index 68672a92b..1656b85fb 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -130,10 +130,10 @@ public:
130 130
131 if (sdl_controller) { 131 if (sdl_controller) {
132 return SDL_GameControllerRumble(sdl_controller.get(), amp_low, amp_high, 132 return SDL_GameControllerRumble(sdl_controller.get(), amp_low, amp_high,
133 rumble_max_duration_ms) == 0; 133 rumble_max_duration_ms) != -1;
134 } else if (sdl_joystick) { 134 } else if (sdl_joystick) {
135 return SDL_JoystickRumble(sdl_joystick.get(), amp_low, amp_high, 135 return SDL_JoystickRumble(sdl_joystick.get(), amp_low, amp_high,
136 rumble_max_duration_ms) == 0; 136 rumble_max_duration_ms) != -1;
137 } 137 }
138 138
139 return false; 139 return false;
diff --git a/src/input_common/sdl/sdl_impl.h b/src/input_common/sdl/sdl_impl.h
index b77afcbd8..7a9ad6346 100644
--- a/src/input_common/sdl/sdl_impl.h
+++ b/src/input_common/sdl/sdl_impl.h
@@ -10,15 +10,7 @@
10#include <thread> 10#include <thread>
11#include <unordered_map> 11#include <unordered_map>
12 12
13// Ignore -Wimplicit-fallthrough due to https://github.com/libsdl-org/SDL/issues/4307
14#ifdef __GNUC__
15#pragma GCC diagnostic push
16#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
17#endif
18#include <SDL.h> 13#include <SDL.h>
19#ifdef __GNUC__
20#pragma GCC diagnostic pop
21#endif
22 14
23#include "common/common_types.h" 15#include "common/common_types.h"
24#include "common/threadsafe_queue.h" 16#include "common/threadsafe_queue.h"