Describes the capabilities of a connected controller. XINPUT_CAPABILITIES is returned by the XInputGetCapabilities function.
typedef struct _XINPUT_CAPABILITIES { BYTE Type; BYTE SubType; WORD Flags; XINPUT_GAMEPAD Gamepad; XINPUT_VIBRATION Vibration; } XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES;
Value | Description |
---|---|
XINPUT_DEVTYPE_GAMEPAD | The device is a game controller. |
Subtype | Meaning |
---|---|
XINPUT_DEVSUBTYPE_ARCADE_STICK | Arcade style joystick |
XINPUT_DEVSUBTYPE_GAMEPAD | Gamepad |
XINPUT_DEVSUBTYPE_WHEEL | Wheel |
Note For restrictions on the use of this subtype value, see the Remarks section below. Additional subtypes may be added in the future.
Value | Description |
---|---|
XINPUT_CAPS_VOICE_SUPPORTED | The device has an integrated voice device. |
XInputGetCapabilities returns XINPUT_CAPABILITIES to indicate the characteristics and available functionality of a specified controller.
XInputGetCapabilities sets the structure members to indicate which inputs the device supports. For binary state controls, such as digital buttons, the corresponding bit reflects whether or not the control is supported by the device. For proportional controls, such as thumbsticks, the value indicates the resolution for that control. Some number of the least significant bits may not be set, indicating that the control does not provide resolution to that level.
The SubType member indicates the specific subtype of controller present. Games may detect the controller subtype and tune their handling of controller input or output based on subtypes that are well suited to their game genre. For example, a car racing game might check for the presence of a wheel controller to provide finer control of the car being driven. However, titles must not disable or ignore a device based on its subtype – subtypes not recognized by the game or for which the game is not specifically tuned should be treated as a standard Xbox 360 Controller (XINPUT_DEVSUBTYPE_GAMEPAD).
Header: Declared in XInput.h.
XInput Structures | XInputGetCapabilities, XINPUT_GAMEPAD, XINPUT_VIBRATION