2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

sdl_impl: Set the maximum vibration duration to 1 second

This commit is contained in:
Morph 2021-01-23 07:46:57 -05:00
parent 65f821850e
commit 5942d206c2

View file

@ -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;