src/haptic/SDL_haptic.c
changeset 3232 aa8de4b80772
parent 3080 4094b4f1c3a1
child 4472 791b3256fb22
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++) {