hasButton method
Query whether a gamepad has a given button.
This merely reports whether the gamepad's mapping defined this button, as that is all the information SDL has about the physical device.
\param gamepad a gamepad. \param button a button enum value (an SDL_GamepadButton value). \returns true if the gamepad has this button, false otherwise.
\since This function is available since SDL 3.1.3.
\sa SDL_GamepadHasAxis
extern SDL_DECLSPEC bool SDLCALL SDL_GamepadHasButton(SDL_Gamepad *gamepad, SDL_GamepadButton button)
Implementation
bool hasButton(int button) {
return sdlGamepadHasButton(this, button);
}