|
@@ -312,6 +312,9 @@ HIDAPI_DriverPS4_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystic
|
|
|
|
|
|
if ((low_frequency_rumble || high_frequency_rumble) && duration_ms) {
|
|
if ((low_frequency_rumble || high_frequency_rumble) && duration_ms) {
|
|
ctx->rumble_expiration = SDL_GetTicks() + SDL_min(duration_ms, SDL_MAX_RUMBLE_DURATION_MS);
|
|
ctx->rumble_expiration = SDL_GetTicks() + SDL_min(duration_ms, SDL_MAX_RUMBLE_DURATION_MS);
|
|
|
|
+ if (!ctx->rumble_expiration) {
|
|
|
|
+ ctx->rumble_expiration = 1;
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
ctx->rumble_expiration = 0;
|
|
ctx->rumble_expiration = 0;
|
|
}
|
|
}
|