Corrected SDL_HapticUpdateEffect() returning 0 instead of index of effect.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sat, 27 Jul 2013 13:39:43 +0200
changeset 75307f26fd1df927
parent 7529 3f571ec09593
child 7531 a117b90a3a12
Corrected SDL_HapticUpdateEffect() returning 0 instead of index of effect.
According to documentation in header and wiki the index should be returned.
This change may break existing programs which assume only 0 means a success.
src/haptic/SDL_haptic.c
     1.1 --- a/src/haptic/SDL_haptic.c	Sat Jul 27 03:48:23 2013 -0700
     1.2 +++ b/src/haptic/SDL_haptic.c	Sat Jul 27 13:39:43 2013 +0200
     1.3 @@ -530,7 +530,7 @@
     1.4  
     1.5      SDL_memcpy(&haptic->effects[effect].effect, data,
     1.6                 sizeof(SDL_HapticEffect));
     1.7 -    return 0;
     1.8 +    return effect;
     1.9  }
    1.10  
    1.11