> ## 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.

# GetSensorsState

> IGameInputReading::GetSensorsState

Retrieve a view of the input reading that describes the state of sensors on the device.

## Syntax

```cpp theme={null}
bool GetSensorsState(
    GameInputSensorsState* state
);
```

### Parameters

*state*   \_Out\_\
Type: [GameInputSensorsState\*](https://docs.xbox.com/reference/input/gameinput/structs/gameinputsensorsstate.md)

Interpretation of the input as a set of sensors.

### Return value

Type: bool

Returns true on successful interpretation of sensor input. Returns false when attempting to read an input that is not recognized as sensor input.

## Remarks

Call the [IGameInputReading::GetInputKind](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getinputkind.md) method to see which Get\*State functions will return a valid interpretation for some [IGameInputReading](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/igameinputreading.md). Each Get\*State function has a corresponding entry in the [IGameInputReading::GetInputKind](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getinputkind.md) enum. If you attempt to call a Get\*State function where the corresponding [IGameInputReading::GetInputKind](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getinputkind.md) flag is not set, the function will return with default at rest values as well as a false return value.

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

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

## See also

[Input API Overview](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\

[IGameInputReading](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/igameinputreading.md)\

[GameInputSensorsState](https://docs.xbox.com/reference/input/gameinput/structs/gameinputsensorsstate.md)\

[GameInputSensorsInfo](https://docs.xbox.com/reference/input/gameinput/structs/gameinputsensorsinfo.md)\

[GameInputSensorsKind](https://docs.xbox.com/reference/input/gameinput/enums/gameinputsensorskind.md)

## Version History

| Version | Changes |
| - | - |
| **v2** | Introduced. |


## Related topics

- [GameInputSensorsState](https://docs.xbox.com/reference/input/gameinput/structs/gameinputsensorsstate.md)
- [IGameInputReading (Interface contents)](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/igameinputreading.md)
- [Deprecated GameInput API members](https://docs.xbox.com/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)
- [GameInput API members](https://docs.xbox.com/reference/input/gameinput/gameinput_members.md)
- [GameInput sensors creation](https://docs.xbox.com/build/core-features/common/input/hardware/input-hardware-sensors.md)
