SDL_GetGamepadButton - Man Page
Get the current state of a button on a gamepad.
Header File
Defined in SDL3/SDL_gamepad.h
Synopsis
#include "SDL3/SDL.h" bool SDL_GetGamepadButton(SDL_Gamepad *gamepad, SDL_GamepadButton button);
Function Parameters
- gamepad
a gamepad.
- button
a button index (one of the SDL_GamepadButton
values).
Return Value
Returns true if the button is pressed, false otherwise.
Availability
This function is available since SDL 3.2.0.
See Also
·(3), SDL_GamepadHasButton(3), ·(3), SDL_GetGamepadAxis(3)
Referenced By
SDL 3.2.2 Simple Directmedia Layer SDL3 FUNCTIONS