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_GetGamepadButtonFromString - Convert a string into an SDL_GamepadButton

Availability

       This function is available since SDL 3.2.0.

Description

       This function is called internally to translate SDL_Gamepad

       mapping strings for the underlying joystick device into the consistent

       SDL_Gamepad
        mapping. You do not normally need to call this function unless you are parsing SDL_Gamepad
        mappings in your own code.

Function Parameters

str    string representing a SDL_Gamepad
               axis.

Header File

       Defined in SDL3/SDL_gamepad.h

Name

       SDL_GetGamepadButtonFromString - Convert a string into an SDL_GamepadButton
        enum.

Return Value

       ( SDL_GamepadButton ) Returns the

       SDL_GamepadButton
        enum corresponding to the input string, or SDL_GAMEPAD_BUTTON_INVALID if no match was found.

See Also

(3), SDL_GetGamepadStringForButton(3)

Simple Directmedia Layer                           SDL 3.2.10                  SDL_GetGamepadButtonFromString(3)

Synopsis

#include"SDL3/SDL.h"SDL_GamepadButtonSDL_GetGamepadButtonFromString(constchar*str);

See Also