GameInputDeviceInfo
Describes all the information about an input device.Syntax
Members
vendorIdType: uint16_t Identifies the vendor of the input device. productId
Type: uint16_t Identifies the input device as a product. revisionNumber
Type: uint16_t Hardware revision number of the device, if any. usage
Type: GameInputUsage Two-part index that describes the input used. hardwareVersion
Type: GameInputVersion Hardware version of the device, if any. firmwareVersion
Type: GameInputVersion Firmware version of the device, if any. deviceId
Type: APP_LOCAL_DEVICE_ID Device ID of the input device. deviceRootId
Type: APP_LOCAL_DEVICE_ID Root ID of the input device. deviceFamily
Type: GameInputDeviceFamily Designates the family of input device that the input device belongs to. supportedInput
Type: GameInputKind Describes the type or types of input that the device supports. supportedRumbleMotors
Type: GameInputRumbleMotors Describes the accessible rumble motors on the device, if any. supportedSystemButtons
Type: GameInputSystemButtons Describes the available buttons for controlling the system, often outside a game. containerId
Type: GUID Container ID of the input device. displayName
Type: const char* Describes the friendly name for the device. pnpPath
Type: const char* Describes the plug and play capability of the device. Use this path to reference the underlying devices through other APIs. keyboardInfo
Type: GameInputKeyboardInfo const * Information about a keyboard input device. mouseInfo
Type: GameInputMouseInfo const * Information about a mouse input device. sensorsInfo
Type: GameInputSensorsInfo const * Information about sensors on the device. controllerInfo
Type: GameInputControllerInfo const * Information about the generic controller input device. The controller represents the raw non-mapped axes, buttons, and switches on a device. arcadeStickInfo
Type: GameInputArcadeStickInfo const * Information about an arcade stick input device. flightStickInfo
Type: GameInputFlightStickInfo const * Information about a flight stick input device. gamepadInfo
Type: GameInputGamepadInfo const * Information about a gamepad input device. racingWheelInfo
Type: GameInputRacingWheelInfo const * Information about a racing wheel input device. forceFeedbackMotorCount
Type: uint32_t The number of force feedback motors on the input device. forceFeedbackMotorInfo
Type: GameInputForceFeedbackMotorInfo const * Information about all the force feedback motors on a device. inputReportCount
Type: uint32_t Number of input reports for the device. inputReportInfo
Type: GameInputRawDeviceReportInfo const * Input report info object. outputReportCount
Type: uint32_t Number of output reports for the device. outputReportInfo
Type: GameInputRawDeviceReportInfo const * Output report.
Remarks
All string members in this structure use UTF-8 encoding. ThedeviceId is an application-local ID: a 256-bit hash value that uniquely identifies the device. This ID always stays the same for a given device, even across runs of an application or reboots of the system, as long as the device connects to the same USB port. The application generates application-local ID hashes, partly with information specific to the calling application and system.
The deviceRootId is another application-local ID, which identifies the root device node for composite devices. This allows applications to reason about the relationship of individual devices. For example, some gaming keyboards work around the legacy USB limit of eight simultaneous keystrokes by exposing themselves as a composite device with multiple keyboard nodes. These nodes are merged together into the “system” keyboard, so this is usually transparent to the user. But when processing per-keyboard input via the GameInput API, understanding this allows applications to avoid improper assumptions (for example, that a keystroke always comes from a specific device) when mapping functions to keystrokes. The deviceId and deviceRootId are the same if the device isn’t one of many interfaces on a composite device.
The displayName string contains a “friendly” name for the device. You can display this string in an application’s UI, but there’s no guarantee that it’s localized. This lack of localization comes from the GameInput API searching several locations for this string, and one of the final fallbacks comes from the device’s firmware.
The final fields in the GameInputDeviceInfo structure are pointers to variable-sized arrays of information about the device, like information about force feedback and haptic feedback support. NULL pointers indicate that the corresponding feature isn’t available or supported by the device. A corresponding field in the structure indicates the number of elements in each array, as noted in the Source Annotation Language (SAL) annotations.
No input device provides readable values for all attributes. Some devices include values only for relevant attributes. The system returns this information through IGameInputDevice::GetDeviceInfo.
Conceptual documentation
See also
Input API OverviewGameInput
IGameInputDevice::GetDeviceInfo
