comparison src/joystick/win32/SDL_dxjoystick.c @ 4423:7953336267c2

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.
author Edgar Simo <bobbens@gmail.com>
date Sun, 28 Feb 2010 09:23:23 +0000
parents f7b03b6838cb
children
comparison
equal deleted inserted replaced
4421:2e140f18aba7 4423:7953336267c2
437 result = 437 result =
438 IDirectInputDevice2_SendForceFeedbackCommand(joystick->hwdata-> 438 IDirectInputDevice2_SendForceFeedbackCommand(joystick->hwdata->
439 InputDevice, 439 InputDevice,
440 DISFFC_RESET); 440 DISFFC_RESET);
441 441
442 /* Not necessarily supported, ignore if not supported.
442 if (FAILED(result)) { 443 if (FAILED(result)) {
443 SetDIerror("IDirectInputDevice2::SendForceFeedbackCommand", 444 SetDIerror("IDirectInputDevice2::SendForceFeedbackCommand",
444 result); 445 result);
445 return (-1); 446 return (-1);
446 } 447 }
448 */
447 449
448 result = IDirectInputDevice2_Unacquire(joystick->hwdata->InputDevice); 450 result = IDirectInputDevice2_Unacquire(joystick->hwdata->InputDevice);
449 451
450 if (FAILED(result)) { 452 if (FAILED(result)) {
451 SetDIerror("IDirectInputDevice2::Unacquire", result); 453 SetDIerror("IDirectInputDevice2::Unacquire", result);
460 462
461 result = 463 result =
462 IDirectInputDevice2_SetProperty(joystick->hwdata->InputDevice, 464 IDirectInputDevice2_SetProperty(joystick->hwdata->InputDevice,
463 DIPROP_AUTOCENTER, &dipdw.diph); 465 DIPROP_AUTOCENTER, &dipdw.diph);
464 466
467 /* Not necessarily supported, ignore if not supported.
465 if (FAILED(result)) { 468 if (FAILED(result)) {
466 SetDIerror("IDirectInputDevice2::SetProperty", result); 469 SetDIerror("IDirectInputDevice2::SetProperty", result);
467 return (-1); 470 return (-1);
468 } 471 }
472 */
469 } 473 }
470 474
471 /* What buttons and axes does it have? */ 475 /* What buttons and axes does it have? */
472 IDirectInputDevice2_EnumObjects(joystick->hwdata->InputDevice, 476 IDirectInputDevice2_EnumObjects(joystick->hwdata->InputDevice,
473 EnumDevObjectsCallback, joystick, 477 EnumDevObjectsCallback, joystick,