src/joystick/hidapi/SDL_hidapi_ps4.c
changeset 13348 448528dc13da
parent 13277 b72b5a030eee
child 13354 8c22865bd138
     1.1 --- a/src/joystick/hidapi/SDL_hidapi_ps4.c	Thu Dec 12 19:07:26 2019 -0800
     1.2 +++ b/src/joystick/hidapi/SDL_hidapi_ps4.c	Mon Dec 16 10:20:03 2019 -0800
     1.3 @@ -298,7 +298,7 @@
     1.4      }
     1.5  
     1.6      if ((low_frequency_rumble || high_frequency_rumble) && duration_ms) {
     1.7 -        ctx->rumble_expiration = SDL_GetTicks() + duration_ms;
     1.8 +        ctx->rumble_expiration = SDL_GetTicks() + SDL_min(duration_ms, SDL_MAX_RUMBLE_DURATION_MS);
     1.9      } else {
    1.10          ctx->rumble_expiration = 0;
    1.11      }