THIS PAGE IS A WORK IN PROGRESS ... Please make edits to this page to improve it!
Get the SDL joystick layer binding for this controller button/axis mapping
Defined in [SDL_gamecontroller.h](https://github.com/libsdl-org/SDL/blob/SDL2/include/SDL_gamecontroller.h), but apps should _only_ `#include "SDL.h"`!
typedef struct SDL_GameControllerButtonBind
{
SDL_GameControllerBindType bindType;union
{int button;
int axis;
struct {
int hat;
int hat_mask;
} hat;
} value;
} SDL_GameControllerButtonBind;
bindType |
What kind of control this maps to (button/axis/hat/not mapped) |
|
int |
button |
The SDL_Joystick button this maps to |
int |
axis |
The SDL_Joystick axis this maps to |
int |
hat.hat |
The SDL_Joystick hat this maps to |
int |
hat.hat_mask |
the mask you need to binary-& with the hat's value with (this probaly corresponds to one direction of the hat) |
CategoryAPI, CategoryAPIStruct, CategoryStruct, CategoryHeader, CategoryDraft