Query whether a game controller has a given button.
Defined in SDL_gamecontroller.h
SDL_bool SDL_GameControllerHasButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button);
SDL_GameController * | gamecontroller | a game controller. |
SDL_GameControllerButton | button | a button enum value (an SDL_GameControllerButton value). |
(SDL_bool) Returns SDL_TRUE if the controller has this button, SDL_FALSE otherwise.
This merely reports whether the controller's mapping defined this button, as that is all the information SDL has about the physical device.
This function is available since SDL 2.0.14.