SDL 3.0
|
#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 | |
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.
Definition at line 242 of file SDL_gamepad.h.
int SDL_GamepadBinding::axis |
Definition at line 251 of file SDL_gamepad.h.
struct { ... } SDL_GamepadBinding::axis |
SDL_GamepadAxis SDL_GamepadBinding::axis |
Definition at line 271 of file SDL_gamepad.h.
struct { ... } SDL_GamepadBinding::axis |
int SDL_GamepadBinding::axis_max |
Definition at line 253 of file SDL_gamepad.h.
int SDL_GamepadBinding::axis_min |
Definition at line 252 of file SDL_gamepad.h.
int SDL_GamepadBinding::button |
Definition at line 247 of file SDL_gamepad.h.
SDL_GamepadButton SDL_GamepadBinding::button |
Definition at line 267 of file SDL_gamepad.h.
int SDL_GamepadBinding::hat |
Definition at line 258 of file SDL_gamepad.h.
struct { ... } SDL_GamepadBinding::hat |
int SDL_GamepadBinding::hat_mask |
Definition at line 259 of file SDL_gamepad.h.
union { ... } SDL_GamepadBinding::input |
SDL_GamepadBindingType SDL_GamepadBinding::input_type |
Definition at line 244 of file SDL_gamepad.h.
union { ... } SDL_GamepadBinding::output |
SDL_GamepadBindingType SDL_GamepadBinding::output_type |
Definition at line 264 of file SDL_gamepad.h.