Fixed SDL_HapticQuery() returning -1 as unsigned int if device is not valid.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 01 May 2013 11:32:05 +0200
changeset 713170a7369c5b32
parent 7130 28df4f1a1712
child 7132 1415923c2eab
Fixed SDL_HapticQuery() returning -1 as unsigned int if device is not valid.

The function now returns 0 which is the same as if no effects were supported.
This may be confusing in rare situations but will not matter most of the time.
src/haptic/SDL_haptic.c
     1.1 --- a/src/haptic/SDL_haptic.c	Mon Apr 29 23:54:22 2013 +0200
     1.2 +++ b/src/haptic/SDL_haptic.c	Wed May 01 11:32:05 2013 +0200
     1.3 @@ -397,7 +397,7 @@
     1.4  SDL_HapticQuery(SDL_Haptic * haptic)
     1.5  {
     1.6      if (!ValidHaptic(haptic)) {
     1.7 -        return -1;
     1.8 +        return 0; /* same as if no effects were supported */
     1.9      }
    1.10  
    1.11      return haptic->supported;