src/joystick/hidapi/SDL_hidapi_xbox360.c
changeset 13348 448528dc13da
parent 13337 9cbbe45952a4
child 13350 a9ce6aa098b6
     1.1 --- a/src/joystick/hidapi/SDL_hidapi_xbox360.c	Thu Dec 12 19:07:26 2019 -0800
     1.2 +++ b/src/joystick/hidapi/SDL_hidapi_xbox360.c	Mon Dec 16 10:20:03 2019 -0800
     1.3 @@ -381,7 +381,7 @@
     1.4  #endif /* __WIN32__ */
     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      }