From 7c9c3955198f865a3a485f7e0f5c55a2b23fc1e2 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 1 May 2013 11:32:05 +0200 Subject: [PATCH] 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c index 5952a455d..d0b6bd25d 100644 --- a/src/haptic/SDL_haptic.c +++ b/src/haptic/SDL_haptic.c @@ -397,7 +397,7 @@ unsigned int SDL_HapticQuery(SDL_Haptic * haptic) { if (!ValidHaptic(haptic)) { - return -1; + return 0; /* same as if no effects were supported */ } return haptic->supported;