28 #ifndef _SDL_gamecontroller_h
29 #define _SDL_gamecontroller_h
55 struct _SDL_GameController;
56 typedef struct _SDL_GameController SDL_GameController;
61 SDL_CONTROLLER_BINDTYPE_NONE = 0,
62 SDL_CONTROLLER_BINDTYPE_BUTTON,
63 SDL_CONTROLLER_BINDTYPE_AXIS,
64 SDL_CONTROLLER_BINDTYPE_HAT
65 } SDL_GameControllerBindType;
72 SDL_GameControllerBindType bindType;
127 #define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
214 SDL_CONTROLLER_AXIS_INVALID = -1,
215 SDL_CONTROLLER_AXIS_LEFTX,
216 SDL_CONTROLLER_AXIS_LEFTY,
217 SDL_CONTROLLER_AXIS_RIGHTX,
218 SDL_CONTROLLER_AXIS_RIGHTY,
219 SDL_CONTROLLER_AXIS_TRIGGERLEFT,
220 SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
221 SDL_CONTROLLER_AXIS_MAX
248 extern DECLSPEC
Sint16 SDLCALL
257 SDL_CONTROLLER_BUTTON_INVALID = -1,
258 SDL_CONTROLLER_BUTTON_A,
259 SDL_CONTROLLER_BUTTON_B,
260 SDL_CONTROLLER_BUTTON_X,
261 SDL_CONTROLLER_BUTTON_Y,
262 SDL_CONTROLLER_BUTTON_BACK,
263 SDL_CONTROLLER_BUTTON_GUIDE,
264 SDL_CONTROLLER_BUTTON_START,
265 SDL_CONTROLLER_BUTTON_LEFTSTICK,
266 SDL_CONTROLLER_BUTTON_RIGHTSTICK,
267 SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
268 SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
269 SDL_CONTROLLER_BUTTON_DPAD_UP,
270 SDL_CONTROLLER_BUTTON_DPAD_DOWN,
271 SDL_CONTROLLER_BUTTON_DPAD_LEFT,
272 SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
273 SDL_CONTROLLER_BUTTON_MAX
uint8_t Uint8
An unsigned 8-bit integer type.
Definition: SDL_stdinc.h:139
DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller)
struct SDL_GameControllerButtonBind SDL_GameControllerButtonBind
DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)
DECLSPEC const char *SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button)
SDL_GameControllerButton
Definition: SDL_gamecontroller.h:255
DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char *mappingString)
SDL_GameControllerAxis
Definition: SDL_gamecontroller.h:212
DECLSPEC char *SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid)
DECLSPEC SDL_GameControllerButtonBind SDLCALL SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)
DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller)
DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops *rw, int freerw)
DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller)
DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *pchString)
DECLSPEC int SDLCALL SDL_GameControllerEventState(int state)
DECLSPEC const char *SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis)
Definition: SDL_joystick.h:68
DECLSPEC SDL_GameControllerButtonBind SDLCALL SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)
DECLSPEC char *SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller)
DECLSPEC void SDLCALL SDL_GameControllerUpdate(void)
DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller)
DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString)
DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index)
DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index)
int16_t Sint16
A signed 16-bit integer type.
Definition: SDL_stdinc.h:143
DECLSPEC Sint16 SDLCALL SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)
DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index)
Definition: SDL_rwops.h:52