From 17e5130b26184915a7dc35fd3e1039aac67370b9 Mon Sep 17 00:00:00 2001 From: Edgar Simo Date: Sun, 28 Feb 2010 09:23:23 +0000 Subject: [PATCH] Disable error checks for reset actuators and set autocenter. 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. --- src/joystick/win32/SDL_dxjoystick.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/joystick/win32/SDL_dxjoystick.c b/src/joystick/win32/SDL_dxjoystick.c index 494bce01d..d9ddaa3b2 100644 --- a/src/joystick/win32/SDL_dxjoystick.c +++ b/src/joystick/win32/SDL_dxjoystick.c @@ -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); @@ -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? */