logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_GetJoystickButton - Get the current state of a button on a joystick.

Availability

       This function is available since SDL 3.2.0.

Function Parameters

joystick
              an SDL_Joystick
               structure containing joystick information.

       button the button index to get the state from; indices start at index 0.

Header File

       Defined in SDL3/SDL_joystick.h

Name

       SDL_GetJoystickButton - Get the current state of a button on a joystick.

Return Value

       Returns true if the button is pressed, false otherwise.

See Also

â€ĸ(3), SDL_GetNumJoystickButtons(3)

Simple Directmedia Layer                           SDL 3.2.10                           SDL_GetJoystickButton(3)

Synopsis

#include"SDL3/SDL.h"boolSDL_GetJoystickButton(SDL_Joystick*joystick,intbutton);

See Also