Fixed SDL_HapticOpened() returning -1 instead of 0.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sat, 27 Jul 2013 14:22:52 +0200
changeset 7533 8f4447da4cfd
parent 7532 2c54272792e2
child 7534 f0f5143b27cf
Fixed SDL_HapticOpened() returning -1 instead of 0. According to header file it should only return 0 or 1.
src/haptic/SDL_haptic.c
--- a/src/haptic/SDL_haptic.c	Sat Jul 27 14:06:06 2013 +0200
+++ b/src/haptic/SDL_haptic.c	Sat Jul 27 14:22:52 2013 +0200
@@ -182,7 +182,7 @@
     if ((device_index < 0) || (device_index >= SDL_numhaptics)) {
         SDL_SetError("Haptic: There are %d haptic devices available",
                      SDL_numhaptics);
-        return -1;
+        return 0;
     }
 
     opened = 0;