public final class XInputCapabilities
extends com.sun.jna.Structure
Describes the capabilities of a connected controller. The XInput.XInputGetCapabilities(int, int, XInputCapabilities)
function returns XInputCapabilities.
XInput.XInputGetCapabilities(int, int, XInputCapabilities)
returns XInputCapabilities to indicate the characteristics
and available functionality of a specified controller. XInput.XInputGetCapabilities(int, int, XInputCapabilities)
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.XINPUT_DEVSUBTYPE_GAMEPAD
). Older XUSB Windows drivers report incomplete capabilities information,
particularly for wireless devices. The latest XUSB Windows driver provides full support for wired and wireless devices, and more complete and
accurate capabilties flags.
Header | XInput.h |
---|
Source: Microsoft Documentation
XInput.XInputGetCapabilities(int, int, XInputCapabilities)
,
XInputGamepad
,
XInputVibration
Modifier and Type | Field and Description |
---|---|
short |
Flags
Features of the controller.
|
XInputGamepad |
Gamepad
XInputGamepad structure that describes available controller features and control resolutions.
|
byte |
SubType
Subtype of the game controller.
|
byte |
Type
Controller type.
|
XInputVibration |
Vibration
XInputVibration structure that describes available vibration functionality and resolutions.
|
Constructor and Description |
---|
XInputCapabilities() |
autoRead, autoRead, autoWrite, autoWrite, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, equals, getAutoRead, getAutoWrite, getPointer, hashCode, newInstance, newInstance, read, readField, setAutoRead, setAutoSynch, setAutoWrite, size, toArray, toArray, toString, toString, write, writeField, writeField
public byte Type
Controller type. It must be one of the following values.
Value | Description |
---|---|
XInput.XINPUT_DEVTYPE_GAMEPAD } | The device is a game controller. |
Source: Microsoft Documentation
public byte SubType
Subtype of the game controller. See XINPUT and Controller Subtypes for a list of allowed subtypes.
Note: For restrictions on the use of this subtype value, see Remarks. More subtypes may be added in the future.Source: Microsoft Documentation
public short Flags
Features of the controller.
Value | Description |
---|---|
XInput.XINPUT_CAPS_VOICE_SUPPORTED } | Device has an integrated voice device. |
XInput.XINPUT_CAPS_FFB_SUPPORTED } | Device supports force feedback functionality. Note that these force-feedback features beyond rumble are not currently supported through XINPUT on Windows. |
XInput.XINPUT_CAPS_WIRELESS } | Device is wireless. |
XInput.XINPUT_CAPS_PMD_SUPPORTED } | Device supports plug-in modules. Note that plug-in modules like the text input device (TID) are not supported currently through XINPUT on Windows. |
XInput.XINPUT_CAPS_NO_NAVIGATION } | Device lacks menu navigation buttons (START, BACK, DPAD). |
Source: Microsoft Documentation
public XInputGamepad Gamepad
Source: Microsoft Documentation
public XInputVibration Vibration
Source: Microsoft Documentation