Expand description

[docs.microsoft.com] APIs for Xbox 360 style controllers

Enumerations

Flags

Functions

C++Rust
XInputEnableenable
XInputGetAudioDeviceIdsget_audio_device_ids
XInputGetBatteryInformationget_battery_information
XInputGetCapabilitiesget_capabilities
XInputGetDSoundAudioDeviceGuidsget_dsound_audio_device_guids
XInputGetKeystrokeget_keystroke
XInputGetStateget_state
XInputGetStateEx ⚠️ 1.3get_state_ex
XInputSetStateset_state
XInputWaitForGuideButton ⚠️ 1.3TODO?
XInputCancelGuideButtonWait ⚠️ 1.3TODO?
XInputPowerOffController ⚠️ 1.3TODO?
XInputGetBaseBusInformation ⚠️ 1.4TODO?
XInputGetCapabilitiesEx ⚠️ 1.4TODO?
LegendDesc
Deprecated
⚠️ 1.3Undocumented XInput 1.3+ function exported by ordinal only
⚠️ 1.4Undocumented XInput 1.4+ function exported by ordinal only

Structures

Alternatives

[docs.microsoft.com] DirectInput

  • ✔️ Supports joysticks with many more buttons and axises than XInput.
  • ✔️ Leverages Windows’s built in support for configuring idle positions, deadzones.
  • ⚠️ Older, “deprecated” in favor of XInput.
  • ❌ Xbox 360 controllers map both triggers to a single axis in DirectInput.
  • Comparison of XInput and DirectInput features discusses how to use a hybrid approach of XInput for 360 controllers and DirectInput for non-XInput devices

[docs.microsoft.com] UWP

  • ✔️ Supports Xbox One trigger rumble (XInput only supports base controller rumble)
  • ⚠️ Can’t recieve input through UWP when the app/window is not active (useful for dev cruft.)
  • ⚠️ No Windows 7 support?

Structs

[docs.microsoft.com] Audio device ids retrieved with get_audio_device_ids

[docs.microsoft.com] XINPUT_BATTERY_INFORMATION

[docs.microsoft.com] XINPUT_GAMEPAD_*

[docs.microsoft.com] XINPUT_CAPABILITIES

[docs.microsoft.com] XINPUT_CAPS_*

[docs.microsoft.com] XINPUT_DEVSUBTYPE_*

[docs.microsoft.com] XINPUT_DEVTYPE_*

[docs.microsoft.com] XINPUT_FLAG_*

[docs.microsoft.com] XINPUT_GAMEPAD

[docs.microsoft.com] XINPUT_KEYSTROKE

[docs.microsoft.com] XINPUT_KEYSTROKE_*

[docs.microsoft.com] XINPUT_STATE

[docs.microsoft.com] XUSER_*

[docs.microsoft.com] VK_* values specific to Xbox 360 controllers

[docs.microsoft.com] XINPUT_VIBRATION

Functions

[docs.microsoft.com] XInputEnable

[docs.microsoft.com] XInputGetAudioDeviceIds

[docs.microsoft.com] XInputGetBatteryInformation

[docs.microsoft.com] XInputGetCapabilities

[docs.microsoft.com] XInputGetDSoundAudioDeviceGuids

[docs.microsoft.com] XInputGetKeystroke

[docs.microsoft.com] XInputGetState

get_state_exDeprecated

[docs.microsoft.com] XInputGetStateEx

[docs.microsoft.com] XInputSetState