Skip to main content

IGameInputReading::GetControllerAxisState

Retrieve axis state information from a game controller.

Syntax

Parameters

stateArrayCount   _In_
Type: uint32_t
The expected number of state arrays to capture the axes on a game controller. This number can be retrieved from IGameInputReading::GetControllerAxisCount stateArray   _Out_writes_(stateArrayCount) Type: float* Pointer to the arrays which contain the axis state data.

Return value

Type: uint32_t Returns the number of valid buffer entries.

Remarks

Most analog controls on a game controller (joysticks, triggers, sliders, dials, etc.) are surfaced as axes, which are floating-point values linearly normalized to the range [0.0, 1.0]. Most digital inputs are surfaced as buttons, which are simple Boolean values. Hat switches are surfaced as switch values, and their position is represented by one of the GameInputSwitchPosition enumeration values.

Requirements

Header: GameInput.h Input API Overview
IGameInputReading

Version History

Last modified on August 4, 2026