diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/input_common/sdl/sdl_impl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index d32eb732a..1b5750937 100644 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp | |||
| @@ -81,10 +81,14 @@ public: | |||
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | bool RumblePlay(u16 amp_low, u16 amp_high) { | 83 | bool RumblePlay(u16 amp_low, u16 amp_high) { |
| 84 | constexpr u32 rumble_max_duration_ms = 1000; | ||
| 85 | |||
| 84 | if (sdl_controller) { | 86 | if (sdl_controller) { |
| 85 | return SDL_GameControllerRumble(sdl_controller.get(), amp_low, amp_high, 0) == 0; | 87 | return SDL_GameControllerRumble(sdl_controller.get(), amp_low, amp_high, |
| 88 | rumble_max_duration_ms) == 0; | ||
| 86 | } else if (sdl_joystick) { | 89 | } else if (sdl_joystick) { |
| 87 | return SDL_JoystickRumble(sdl_joystick.get(), amp_low, amp_high, 0) == 0; | 90 | return SDL_JoystickRumble(sdl_joystick.get(), amp_low, amp_high, |
| 91 | rumble_max_duration_ms) == 0; | ||
| 88 | } | 92 | } |
| 89 | 93 | ||
| 90 | return false; | 94 | return false; |