Compartilhar via


GameInputSwitchPosition

Enumerates positions of a switch on an input device.

Syntax

typedef enum GameInputSwitchPosition  
{  
    GameInputSwitchCenter = 0,  
    GameInputSwitchUp = 1,  
    GameInputSwitchUpRight = 2,  
    GameInputSwitchRight = 3,  
    GameInputSwitchDownRight = 4,  
    GameInputSwitchDown = 5,  
    GameInputSwitchDownLeft = 6,  
    GameInputSwitchLeft = 7,  
    GameInputSwitchUpLeft = 8  
} GameInputSwitchPosition  

Constants

Constant Description
GameInputSwitchCenter Center position.
GameInputSwitchUp Up position.
GameInputSwitchUpRight Up-right position.
GameInputSwitchRight Right position.
GameInputSwitchDownRight Down-right position.
GameInputSwitchDown Down position.
GameInputSwitchDownLeft Down-left position.
GameInputSwitchLeft Left position.
GameInputSwitchUpLeft Up-left position.

Remarks

Not every switch supports each value.

This enumeration is used in the GameInputFlightStickState structure and the IGameInputReading::GetControllerSwitchState method.

For intermediate and advanced use cases of the GameInput API, see Advanced GameInput topics.

Requirements

Header: GameInput.h

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

Overview of GameInput
GameInput