Compartir a través de


XInputOnGameInput

The Microsoft Game Development Kit (GDK) ships with the header file XInputOnGameInput.h, which contains an implementation of the XInput API on top of GameInput. We recommend porting directly to GameInput, especially if a keyboard and mouse or other input devices are desired. However, the XInputOnGameInput wrapper can be used to help bootstrap an initial porting effort without requiring any changes to existing XInput code.

Functions

Function Description
XInputEnable XInputEnable API reference
XInputGetAudioDeviceIds Retrieves the IDs of the audio render and capture devices of the headset connected to the specified controller.
XInputGetBatteryInformation Retrieves the battery type and charge status of a wireless controller.
XInputGetCapabilities Retrieves the capabilities and features of a connected controller.
XInputGetDeviceId Retrieves the device ID for the specified controller.
XInputGetKeystroke XInputGetKeystroke API reference
XInputGetState Retrieves the current state of the specified controller.
XInputGetStateWithToken Retrieves the current state of the specified controller and associates it with a D3DX frame pipeline token.
XInputOnGameInputInitialize XInputOnGameInputInitialize API reference
XInputOnGameInputUninitialize XInputOnGameInputUninitialize API reference
XInputSetState Sends vibration data to the specified two-motor controller.
XInputSetStateEx Sends vibration data to the specified controller. Supports the four-motor vibration capability of newer controllers.

Structures

Structure Description
XINPUT_BATTERY_INFORMATION Describes the type and charge state of a battery.
XINPUT_CAPABILITIES XINPUT_CAPABILITIES API reference
XINPUT_GAMEPAD XINPUT_GAMEPAD API reference
XINPUT_KEYSTROKE Describes keystroke data returned by the XInputGetKeystroke function.
XINPUT_STATE Describes the state of a controller.
XINPUT_VIBRATION Describes motor speeds for the vibration capability of a two-motor controller.
XINPUT_VIBRATION_EX Describes motor speeds for the vibration capability of a four-motor controller.