SDL_GetGamepadButton(3)

SDL_GetGamepadButton3

Get the current state of a button on a gamepad.

Usage

#include "SDL3/SDL.h"

bool SDL_GetGamepadButton(SDL_Gamepad *gamepad, SDL_GamepadButton button);

Header file

Defined in SDL3/SDL_gamepad.h

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.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.