Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
3231:cf1ec33ae056 | 3232:aa8de4b80772 |
---|---|
261 int i; | 261 int i; |
262 SDL_Haptic *haptic; | 262 SDL_Haptic *haptic; |
263 | 263 |
264 /* Must be a valid joystick */ | 264 /* Must be a valid joystick */ |
265 if (!SDL_PrivateJoystickValid(&joystick)) { | 265 if (!SDL_PrivateJoystickValid(&joystick)) { |
266 SDL_SetError("Haptic: Joystick isn't valid."); | |
266 return NULL; | 267 return NULL; |
267 } | 268 } |
268 | 269 |
269 /* Joystick must be haptic */ | 270 /* Joystick must be haptic */ |
270 if (SDL_SYS_JoystickIsHaptic(joystick) <= 0) { | 271 if (SDL_SYS_JoystickIsHaptic(joystick) <= 0) { |
272 SDL_SetError("Haptic: Joystick isn't a haptic device."); | |
271 return NULL; | 273 return NULL; |
272 } | 274 } |
273 | 275 |
274 /* Check to see if joystick's haptic is already open */ | 276 /* Check to see if joystick's haptic is already open */ |
275 for (i = 0; SDL_haptics[i]; i++) { | 277 for (i = 0; SDL_haptics[i]; i++) { |