From 56216ac73fa4d2eb8aa413f26df0a5651c59832b Mon Sep 17 00:00:00 2001 From: Edgar Simo Date: Wed, 5 Aug 2009 16:31:49 +0000 Subject: [PATCH] Patch by Janosch Gr?f I just noticed that there are rarely error messages and added some. --- src/haptic/SDL_haptic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c index bb66af67b..2ac4a12b6 100644 --- a/src/haptic/SDL_haptic.c +++ b/src/haptic/SDL_haptic.c @@ -263,11 +263,13 @@ SDL_HapticOpenFromJoystick(SDL_Joystick * joystick) /* 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; }