|
@@ -298,7 +298,7 @@ HIDAPI_DriverPS4_Rumble(SDL_Joystick *joystick, hid_device *dev, void *context,
|
|
}
|
|
}
|
|
|
|
|
|
if ((low_frequency_rumble || high_frequency_rumble) && duration_ms) {
|
|
if ((low_frequency_rumble || high_frequency_rumble) && duration_ms) {
|
|
- ctx->rumble_expiration = SDL_GetTicks() + duration_ms;
|
|
|
|
|
|
+ ctx->rumble_expiration = SDL_GetTicks() + SDL_min(duration_ms, SDL_MAX_RUMBLE_DURATION_MS);
|
|
} else {
|
|
} else {
|
|
ctx->rumble_expiration = 0;
|
|
ctx->rumble_expiration = 0;
|
|
}
|
|
}
|