> ## 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::GetControllerAxisCount

> Gets the number of generic controller axes on the device.

Gets the number of generic controller axes on the device.

## Syntax

```cpp theme={null}
uint32_t GetControllerAxisCount();
```

### Parameters

This method has no parameters.

### Return value

Type: uint32\_t

The number of controller axes on the device, or 0 if the device has no controller axes.

## Remarks

Controller axes are the raw, unmapped axes of a device. A device has controller axes when the value returned by [GetSupportedInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md) includes `GameInputKindControllerAxis`. Readings from the device that include `GameInputKindControllerAxis` report the same number of axes through [IGameInputReading::GetControllerAxisCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrolleraxiscount.md).

Use the returned value to size the array that you pass to [GetControllerAxisLabels](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontrolleraxislabels.md) or to [IGameInputReading::GetControllerAxisState](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrolleraxisstate.md). The number of axes doesn't change while the device is connected.

In GameInput v3 and earlier, this information was available from the `controllerAxisCount` member of the [GameInputControllerInfo](https://docs.xbox.com/reference/input/gameinput/deprecated/structs/gameinputcontrollerinfo.md) structure, which was referenced by the `controllerInfo` 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)\
[GetControllerAxisLabels](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontrolleraxislabels.md)\
[IGameInputReading::GetControllerAxisCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrolleraxiscount.md)\
[IGameInputReading::GetControllerAxisState](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrolleraxisstate.md)\
[IGameInputDevice](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## Version History

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


## Related topics

- [GameInputControllerInfo (Deprecated)](https://docs.xbox.com/reference/input/gameinput/deprecated/structs/gameinputcontrollerinfo.md)
- [IGameInputDevice::GetControllerAxisLabels](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontrolleraxislabels.md)
- [GetControllerAxisCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrolleraxiscount.md)
- [IGameInputDevice::GetControllerButtonCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontrollerbuttoncount.md)
- [IGameInputDevice::GetControllerSwitchCount](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontrollerswitchcount.md)
