SDL_GamepadBinding Struct Reference

`#include <SDL_gamepad.h>`

## Data Fields

SDL_GamepadBindingType | input_type
union { |
int button |
struct { |
int axis |
int axis_min |
int axis_max |
} axis |
struct { |
int hat |
int hat_mask |
} hat |
} | input |
SDL_GamepadBindingType | output_type
union { |
SDL_GamepadButton button |
struct { |
SDL_GamepadAxis axis |
int axis_min |
int axis_max |
} axis |
} | output |

## Detailed Description

A mapping between one joystick input to a gamepad control.

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.

Since
  This struct is available since SDL 3.2.0.

See also
  SDL_GetGamepadBindings

Definition at line 262 of file SDL_gamepad.h.

## Field Documentation

## axis [1/4]

int SDL_GamepadBinding::axis

Definition at line 271 of file SDL_gamepad.h.

## [struct] [2/4]

struct { ... } SDL_GamepadBinding::axis

## axis [3/4]

SDL_GamepadAxis SDL_GamepadBinding::axis

Definition at line 291 of file SDL_gamepad.h.

## [struct] [4/4]

struct { ... } SDL_GamepadBinding::axis

## axis_max

int SDL_GamepadBinding::axis_max

Definition at line 273 of file SDL_gamepad.h.

## axis_min

int SDL_GamepadBinding::axis_min

Definition at line 272 of file SDL_gamepad.h.

## button [1/2]

int SDL_GamepadBinding::button

Definition at line 267 of file SDL_gamepad.h.

## button [2/2]

SDL_GamepadButton SDL_GamepadBinding::button

Definition at line 287 of file SDL_gamepad.h.

## hat [1/2]

int SDL_GamepadBinding::hat

Definition at line 278 of file SDL_gamepad.h.

## [struct] [2/2]

struct { ... } SDL_GamepadBinding::hat

## hat_mask

int SDL_GamepadBinding::hat_mask

Definition at line 279 of file SDL_gamepad.h.

## [union]

union { ... } SDL_GamepadBinding::input

## input_type

SDL_GamepadBindingType SDL_GamepadBinding::input_type

Definition at line 264 of file SDL_gamepad.h.

## [union]

union { ... } SDL_GamepadBinding::output

## output_type

SDL_GamepadBindingType SDL_GamepadBinding::output_type

Definition at line 284 of file SDL_gamepad.h.

The documentation for this struct was generated from the following file:

- SDL_gamepad.h