SDL_GamepadBinding - A mapping between one joystick input to a gamepad control.
Contents
Availability
This struct is available since SDL 3.2.0.
Description
A gamepad has a collection of several bindings, to say, for example, when joystick button number 5 is
pressed, that should be treated like the gamepad's "start" button.
SDL has these bindings built-in for many popular controllers, and can add more with a simple text string.
Those strings are parsed into a collection of these structs to make it easier to operate on the data.
Header File
Defined in SDL3/SDL_gamepad.h
Name
SDL_GamepadBinding - A mapping between one joystick input to a gamepad control.
See Also
âĸ(3), SDL_GetGamepadBindings(3) Simple Directmedia Layer SDL 3.2.10 SDL_GamepadBinding(3type)
Synopsis
#include"SDL3/SDL.h"typedefstructSDL_GamepadBinding{SDL_GamepadBindingTypeinput_type;union{intbutton;struct{intaxis;intaxis_min;intaxis_max;}axis;struct{inthat;inthat_mask;}hat;}input;SDL_GamepadBindingTypeoutput_type;union{SDL_GamepadButtonbutton;struct{SDL_GamepadAxisaxis;intaxis_min;intaxis_max;}axis;}output;}SDL_GamepadBinding;