src/haptic/SDL_haptic.c
changeset 7531 a117b90a3a12
parent 7530 7f26fd1df927
child 7533 8f4447da4cfd
     1.1 --- a/src/haptic/SDL_haptic.c	Sat Jul 27 13:39:43 2013 +0200
     1.2 +++ b/src/haptic/SDL_haptic.c	Sat Jul 27 13:52:16 2013 +0200
     1.3 @@ -781,7 +781,6 @@
     1.4  int
     1.5  SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length)
     1.6  {
     1.7 -    int ret;
     1.8      SDL_HapticPeriodic *efx;
     1.9  
    1.10      if (!ValidHaptic(haptic)) {
    1.11 @@ -804,9 +803,8 @@
    1.12      efx = &haptic->rumble_effect.periodic;
    1.13      efx->magnitude = (Sint16)(32767.0f*strength);
    1.14      efx->length = length;
    1.15 -    ret = SDL_HapticUpdateEffect(haptic, haptic->rumble_id, &haptic->rumble_effect);
    1.16 -    if (ret) {
    1.17 -        return ret;
    1.18 +    if (SDL_HapticUpdateEffect(haptic, haptic->rumble_id, &haptic->rumble_effect) < 0) {
    1.19 +        return -1;
    1.20      }
    1.21  
    1.22      return SDL_HapticRunEffect(haptic, haptic->rumble_id, 1);