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);
SDL_GameController * | gamecontroller | a game controller. |
SDL_GameControllerButton | button | a button index (one of the SDL_GameControllerButton values). |
(Uint8) 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.