Patch by Janosch Gräf <janosch.graef@gmx.net>
authorEdgar Simo <bobbens@gmail.com>
Wed, 05 Aug 2009 16:31:49 +0000
changeset 3232 aa8de4b80772
parent 3231 cf1ec33ae056
child 3233 91eaef1c9cfe
Patch by Janosch Gräf <janosch.graef@gmx.net> I just noticed that there are rarely error messages and added some.
src/haptic/SDL_haptic.c
--- a/src/haptic/SDL_haptic.c	Wed Aug 05 08:12:31 2009 +0000
+++ b/src/haptic/SDL_haptic.c	Wed Aug 05 16:31:49 2009 +0000
@@ -263,11 +263,13 @@
 
     /* Must be a valid joystick */
     if (!SDL_PrivateJoystickValid(&joystick)) {
+        SDL_SetError("Haptic: Joystick isn't valid.");
         return NULL;
     }
 
     /* Joystick must be haptic */
     if (SDL_SYS_JoystickIsHaptic(joystick) <= 0) {
+        SDL_SetError("Haptic: Joystick isn't a haptic device.");
         return NULL;
     }