Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Patch by Janosch Gr?f <janosch.graef@gmx.net>
I just noticed that there are rarely error messages and added some.
  • Loading branch information
bobbens committed Aug 5, 2009
1 parent 52a5bb2 commit 56216ac73fa4d2eb8aa413f26df0a5651c59832b
Showing with 2 additions and 0 deletions.
  1. +2 −0 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;
}

0 comments on commit 56216ac

Please sign in to comment.