changeset 3232:aa8de4b80772

Patch by Janosch Gräf <janosch.graef@gmx.net> I just noticed that there are rarely error messages and added some.
author Edgar Simo <bobbens@gmail.com>
date Wed, 05 Aug 2009 16:31:49 +0000
parents cf1ec33ae056
children 91eaef1c9cfe
files src/haptic/SDL_haptic.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
     }