Syntax
Parameters
This method has no parameters.Return value
Type: uint32_t The number of controller switches on the device, or 0 if the device has no controller switches.Remarks
Controller switches are the raw, unmapped multi-position switches of a device, such as hat switches and directional pads. A device has controller switches when the value returned by GetSupportedInput includesGameInputKindControllerSwitch. Readings from the device that include GameInputKindControllerSwitch report the same number of switches through IGameInputReading::GetControllerSwitchCount.
Use the returned value to size the array that you pass to GetControllerSwitchInfo or to IGameInputReading::GetControllerSwitchState. The number of switches doesn’t change while the device is connected.
In GameInput v3 and earlier, this information was available from the controllerSwitchCount 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 GameInputGetControllerSwitchInfo
IGameInputReading::GetControllerSwitchCount
IGameInputReading::GetControllerSwitchState
IGameInputDevice
