From 4305fc3c0b1d1ebc425ba7036f33ea31abdc8ab4 Mon Sep 17 00:00:00 2001 From: Edgar Simo Date: Wed, 5 Aug 2009 16:31:49 +0000 Subject: [PATCH] =?UTF-8?q?Patch=20by=20Janosch=20Gr=C3=A4f=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I just noticed that there are rarely error messages and added some. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403744 --- 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; }