Syntax
Parameters
info   _Out_Type: GameInputGamepadInfo* Pointer to a
GameInputGamepadInfo structure that receives the gamepad properties of the device. If the device doesn’t support gamepad input, every member of the structure is set to zero.
Return value
Type: booltrue if the device supports gamepad input and info was filled in; otherwise, false.
Remarks
TheGetGamepadInfo method copies the gamepad properties of the device into the caller-provided structure. A device supports gamepad input when the value returned by GetSupportedInput includes GameInputKindGamepad. If the device doesn’t support gamepad input, GetGamepadInfo zero-initializes info and returns false.
The supportedLayout member is a combination of GameInputGamepadButtons flags that identifies which standard gamepad buttons the device has. The label members describe the markings printed on the corresponding controls, as GameInputLabel values, so you can show matching prompts in your UI. The extraButtonCount and extraAxisCount members report how many controller buttons and axes the device has beyond the standard gamepad mapping; use GetExtraButtonIndexes and GetExtraAxisIndexes to locate them in the controller state of a reading. Gamepad state is read from readings by using IGameInputReading::GetGamepadState.
The properties returned by this method are fixed for the lifetime of the device, so you can query them once (for example, when the device connects) and cache the result.
The following example shows how to query the gamepad properties of a device.
gamepadInfo member of the GameInputDeviceInfo structure returned by IGameInputDevice::GetDeviceInfo.
Requirements
Header: GameInput.h Library: gameinput.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesSee also
Overview of GameInputGameInputGamepadInfo
GetSupportedInput
GameInputKind
GameInputGamepadButtons
GameInputLabel
IGameInputReading::GetGamepadState
IGameInputDevice
