Get the current state of a button on a game controller.
Defined in SDL_gamecontroller.h
Uint8 SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
SDL_GameControllerButton button);
gamecontroller | a game controller |
button | a button index (one of the SDL_GameControllerButton values) |
Returns 1 for pressed state or 0 for not pressed state or error; call SDL_GetError() for more information.
This function is available since SDL 2.0.0.