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 7530 7f26fd1df927
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
--- a/src/haptic/SDL_haptic.c	Sat Jul 27 03:48:23 2013 -0700
+++ b/src/haptic/SDL_haptic.c	Sat Jul 27 13:39:43 2013 +0200
@@ -530,7 +530,7 @@
 
     SDL_memcpy(&haptic->effects[effect].effect, data,
                sizeof(SDL_HapticEffect));
-    return 0;
+    return effect;
 }