win/gamepad_probe.cpp
bool SetDirectInputDeadZone(IDirectInputDevice8* gamepad,
                            int deadzone) {
  DIPROPDWORD prop;
  prop.diph.dwSize = sizeof(DIPROPDWORD);
  prop.diph.dwHeaderSize = sizeof(DIPROPHEADER);
  prop.diph.dwObj = 0;
  prop.diph.dwHow = DIPH_DEVICE;
  prop.dwData = deadzone;
  return SUCCEEDED(gamepad->SetProperty(DIPROP_DEADZONE, &prop.diph));
}
// Sets the deadzone value for all axes of a gamepad.
// deadzone values range from 0 (no deadzone) to 10,000 (entire range
// is dead).
Sets the deadzone value for all axes of a gamepad.
deadzone values range from 0 (no deadzone) to 10,000 (entire range
is dead).
Sets the deadzone value for all axes of a gamepad . deadzone values range from 0 ( no deadzone ) to 10 000 ( entire range is dead ) .
bool SetDirectInputDeadZone(IDirectInputDevice8* gamepad,
                            int deadzone) {
  DIPROPDWORD prop;
  prop.diph.dwSize = sizeof(DIPROPDWORD);
  prop.diph.dwHeaderSize = sizeof(DIPROPHEADER);
  prop.diph.dwObj = 0;
  prop.diph.dwHow = DIPH_DEVICE;
  prop.dwData = deadzone;
  return SUCCEEDED(gamepad->SetProperty(DIPROP_DEADZONE, &prop.diph));
}
bool SetDirectInputDeadZone ( IDirectInputDevice8 * gamepad , int deadzone ) { DIPROPDWORD prop ; prop . diph . dwSize = sizeof ( DIPROPDWORD ) ; prop . diph . dwHeaderSize = sizeof ( DIPROPHEADER ) ; prop . diph . dwObj = 0 ; prop . diph . dwHow = DIPH_DEVICE ; prop . dwData = deadzone ; return SUCCEEDED ( gamepad -> SetProperty ( DIPROP_DEADZONE , & prop . diph ) ) ; }
Sets the deadzone value for all axes of a gamepad.
Sets the deadzone value for all axes of a gamepad .