Skip to main content
Retrieves the sensor properties of the device, such as which motion and orientation sensors it has.

Syntax

Parameters

info   _Out_
Type: GameInputSensorsInfo*
Pointer to a GameInputSensorsInfo structure that receives the sensor properties of the device. If the device doesn’t support sensor input, every member of the structure is set to zero.

Return value

Type: bool true if the device supports sensor input and info was filled in; otherwise, false.

Remarks

The GetSensorsInfo method copies the sensor properties of the device into the caller-provided structure. A device supports sensor input when the value returned by GetSupportedInput includes GameInputKindSensors. If the device doesn’t support sensor input, GetSensorsInfo zero-initializes info and returns false. The supportedSensors member is a combination of GameInputSensorsKind flags that identifies the sensors on the device. Sensor state is read from readings by using IGameInputReading::GetSensorsState. 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 sensor properties of a device.
In GameInput v3 and earlier, this information was available from the sensorsInfo 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 consoles

See also

Overview of GameInput
GameInputSensorsInfo
GetSupportedInput
GameInputKind
GameInputSensorsKind
IGameInputReading::GetSensorsState
IGameInputDevice

Version History

Last modified on November 5, 2026