Syntax
Parameters
labelArrayCount   _In_Type: uint32_t Number of elements in labelArray. To retrieve all controller axis labels, pass the value returned by GetControllerAxisCount. labelArray   _Out_writes_to_opt_(labelArrayCount, return)
Type: GameInputLabel* Pointer to an array that receives one label per controller axis. Can be
nullptr, in which case nothing is written and the method returns 0.
Return value
Type: uint32_t The number of elements written to labelArray. This is the smaller of labelArrayCount and the number of controller axis labels on the device, or 0 if labelArray isnullptr or the device has no controller axis labels.
Remarks
Each element is a GameInputLabel value that identifies the marking printed on the corresponding axis, if the device reports one. Call GetControllerAxisCount to get the number of controller axis labels, allocate an array of that size, and then callGetControllerAxisLabels to fill it. If labelArrayCount is smaller than the number of controller axis labels, only the first labelArrayCount elements are written. The controller axis labels of a device don’t change while the device is connected, so you can query them once and cache the result.
Element i of the label array describes the axis at index i of the array returned by IGameInputReading::GetControllerAxisState for readings from this device.
The following example shows how to retrieve the controller axis labels of a device.
controllerAxisLabels member of the GameInputControllerInfo structure, which was referenced by the controllerInfo 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 consolesSee also
Overview of GameInputGetControllerAxisCount
GameInputLabel
IGameInputReading::GetControllerAxisState
IGameInputDevice
