SDL_GetJoystickButton - Man Page
Get the current state of a button on a joystick.
Header File
Defined in SDL3/SDL_joystick.h
Synopsis
#include "SDL3/SDL.h" bool SDL_GetJoystickButton(SDL_Joystick *joystick, int button);
Function Parameters
- joystick
an SDL_Joystick
structure containing joystick information.- button
the button index to get the state from; indices start at index 0.
Return Value
Returns true if the button is pressed, false otherwise.
Availability
This function is available since SDL 3.2.0.
See Also
Referenced By
SDL 3.2.2 Simple Directmedia Layer SDL3 FUNCTIONS