DRAFT |
SDL_GameControllerGetButton
Use this function to get the current state of a button on a game controller.
Contents
Syntax
Uint8 SDL_GameControllerGetButton(SDL_GameController* gamecontroller,
SDL_GameControllerButton button)
Function Parameters
gamecontroller |
a game controller |
button |
a button index (one of the SDL_GameControllerButton values) |
Return Value
Returns 1 for pressed state or 0 for not pressed state or error; call SDL_GetError() for more information.
Code Examples
You can add your code example here
Remarks
The button indices start at index 0.
Version
This function is available since SDL 2.0.0.