Syntax
Parameters
This method has no parameters.Return value
Type: uint32_t The number of controller buttons on the device, or 0 if the device has no controller buttons.Remarks
Controller buttons are the raw, unmapped buttons of a device. A device has controller buttons when the value returned by GetSupportedInput includesGameInputKindControllerButton. Readings from the device that include GameInputKindControllerButton report the same number of buttons through IGameInputReading::GetControllerButtonCount.
Use the returned value to size the array that you pass to GetControllerButtonLabels or to IGameInputReading::GetControllerButtonState. The number of buttons doesn’t change while the device is connected.
In GameInput v3 and earlier, this information was available from the controllerButtonCount 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 GameInputGetControllerButtonLabels
IGameInputReading::GetControllerButtonCount
IGameInputReading::GetControllerButtonState
IGameInputDevice
