summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLC <mathew1800@gmail.com>2021-01-23 16:46:18 +0100
committerGitHub <noreply@github.com>2021-01-23 16:46:18 +0100
commitbfd2bcb068db0bcefcf4de231e9a351a37953601 (patch)
tree9524ecae015a27c0b5e1c42d2a83e14ace9fdf82
parentMerge pull request #5797 from ReinUsesLisp/nsight-aftermath-build (diff)
parentsdl_impl: Set the maximum vibration duration to 1 second (diff)
downloadyuzu-bfd2bcb068db0bcefcf4de231e9a351a37953601.tar
yuzu-bfd2bcb068db0bcefcf4de231e9a351a37953601.tar.gz
yuzu-bfd2bcb068db0bcefcf4de231e9a351a37953601.tar.bz2
yuzu-bfd2bcb068db0bcefcf4de231e9a351a37953601.tar.lz
yuzu-bfd2bcb068db0bcefcf4de231e9a351a37953601.tar.xz
yuzu-bfd2bcb068db0bcefcf4de231e9a351a37953601.tar.zst
yuzu-bfd2bcb068db0bcefcf4de231e9a351a37953601.zip
-rw-r--r--src/input_common/sdl/sdl_impl.cpp8
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:
}
bool RumblePlay(u16 amp_low, u16 amp_high) {
+ constexpr u32 rumble_max_duration_ms = 1000;
+
if (sdl_controller) {
- return SDL_GameControllerRumble(sdl_controller.get(), amp_low, amp_high, 0) == 0;
+ return SDL_GameControllerRumble(sdl_controller.get(), amp_low, amp_high,
+ rumble_max_duration_ms) == 0;
} else if (sdl_joystick) {
- return SDL_JoystickRumble(sdl_joystick.get(), amp_low, amp_high, 0) == 0;
+ return SDL_JoystickRumble(sdl_joystick.get(), amp_low, amp_high,
+ rumble_max_duration_ms) == 0;
}
return false;