Mercurial > sdl-ios-xcode
diff src/haptic/SDL_haptic.c @ 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 | 4094b4f1c3a1 |
children | 791b3256fb22 |
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; }