> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IGameInputDevice::GetSensorsInfo

> Retrieves the sensor properties of the device, such as which motion and orientation sensors it has.

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

## Syntax

```cpp theme={null}
bool GetSensorsInfo(
    GameInputSensorsInfo* info
);
```

### Parameters

*info*   \_Out\_\
Type: [GameInputSensorsInfo](https://docs.xbox.com/reference/input/gameinput/structs/gameinputsensorsinfo.md)\*

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](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md) 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](https://docs.xbox.com/reference/input/gameinput/enums/gameinputsensorskind.md) flags that identifies the sensors on the device. Sensor state is read from readings by using [IGameInputReading::GetSensorsState](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getsensorsstate.md).

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.

```cpp theme={null}
GameInputSensorsInfo info;
if (device->GetSensorsInfo(&info))
{
    if (info.supportedSensors & GameInputSensorsGyrometer)
    {
        // Enable gyro aiming.
    }
}
```

In GameInput v3 and earlier, this information was available from the `sensorsInfo` member of the [GameInputDeviceInfo](https://docs.xbox.com/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) structure returned by [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md).

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[Overview of GameInput](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\
[GameInputSensorsInfo](https://docs.xbox.com/reference/input/gameinput/structs/gameinputsensorsinfo.md)\
[GetSupportedInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)\
[GameInputKind](https://docs.xbox.com/reference/input/gameinput/enums/gameinputkind.md)\
[GameInputSensorsKind](https://docs.xbox.com/reference/input/gameinput/enums/gameinputsensorskind.md)\
[IGameInputReading::GetSensorsState](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getsensorsstate.md)\
[IGameInputDevice](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## Version History

| Version | Changes |
| - | - |
| **v4** | Introduced. |


## Related topics

- [GameInputSensorsInfo](https://docs.xbox.com/reference/input/gameinput/structs/gameinputsensorsinfo.md)
- [GameInputSensorsKind](https://docs.xbox.com/reference/input/gameinput/enums/gameinputsensorskind.md)
- [IGameInputDevice::GetInputReportInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportinfo.md)
- [IGameInputDevice::GetKeyboardInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getkeyboardinfo.md)
- [IGameInputDevice::GetGamepadInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getgamepadinfo.md)
