Patch by Janosch Gräf <janosch.graef@gmx.net>
I just noticed that there are rarely error messages and added some. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403744
This commit is contained in:
parent
3d28b5de16
commit
4305fc3c0b
1 changed files with 2 additions and 0 deletions
|
@ -263,11 +263,13 @@ SDL_HapticOpenFromJoystick(SDL_Joystick * joystick)
|
||||||
|
|
||||||
/* Must be a valid joystick */
|
/* Must be a valid joystick */
|
||||||
if (!SDL_PrivateJoystickValid(&joystick)) {
|
if (!SDL_PrivateJoystickValid(&joystick)) {
|
||||||
|
SDL_SetError("Haptic: Joystick isn't valid.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Joystick must be haptic */
|
/* Joystick must be haptic */
|
||||||
if (SDL_SYS_JoystickIsHaptic(joystick) <= 0) {
|
if (SDL_SYS_JoystickIsHaptic(joystick) <= 0) {
|
||||||
|
SDL_SetError("Haptic: Joystick isn't a haptic device.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue