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_GamepadHasButton - Query whether a gamepad has a given button.

Availability

       This function is available since SDL 3.2.0.

Description

       This merely reports whether the gamepad's mapping defined this button, as that is all the information SDL
       has about the physical device.

Function Parameters

gamepad
              a gamepad.

       button a button enum value (an SDL_GamepadButton
               value).

Header File

       Defined in SDL3/SDL_gamepad.h

Name

       SDL_GamepadHasButton - Query whether a gamepad has a given button.

Return Value

       Returns true if the gamepad has this button, false otherwise.

See Also

(3), SDL_GamepadHasAxis(3)

Simple Directmedia Layer                           SDL 3.2.10                            SDL_GamepadHasButton(3)

Synopsis

#include"SDL3/SDL.h"boolSDL_GamepadHasButton(SDL_Gamepad*gamepad,SDL_GamepadButtonbutton);

See Also