Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Disable error checks for reset actuators and set autocenter.
Browse files Browse the repository at this point in the history
Reset actuators and set autocenter might not actually be supported on all
 implementations. We'll just disable error checking since they aren't
 critical to neither opening the joystick nor the haptic subsystem.
  • Loading branch information
bobbens committed Feb 28, 2010
1 parent 0af85f0 commit 17e5130
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/joystick/win32/SDL_dxjoystick.c
Expand Up @@ -439,11 +439,13 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick)
InputDevice,
DISFFC_RESET);

/* Not necessarily supported, ignore if not supported.
if (FAILED(result)) {
SetDIerror("IDirectInputDevice2::SendForceFeedbackCommand",
result);
return (-1);
}
*/

result = IDirectInputDevice2_Unacquire(joystick->hwdata->InputDevice);

Expand All @@ -462,10 +464,12 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick)
IDirectInputDevice2_SetProperty(joystick->hwdata->InputDevice,
DIPROP_AUTOCENTER, &dipdw.diph);

/* Not necessarily supported, ignore if not supported.
if (FAILED(result)) {
SetDIerror("IDirectInputDevice2::SetProperty", result);
return (-1);
}
*/
}

/* What buttons and axes does it have? */
Expand Down

0 comments on commit 17e5130

Please sign in to comment.