28 #ifndef SDL_gamecontroller_h_ 29 #define SDL_gamecontroller_h_ 57 struct _SDL_GameController;
58 typedef struct _SDL_GameController SDL_GameController;
63 SDL_CONTROLLER_BINDTYPE_NONE = 0,
64 SDL_CONTROLLER_BINDTYPE_BUTTON,
65 SDL_CONTROLLER_BINDTYPE_AXIS,
66 SDL_CONTROLLER_BINDTYPE_HAT
67 } SDL_GameControllerBindType;
74 SDL_GameControllerBindType bindType;
129 #define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1) 274 SDL_CONTROLLER_AXIS_INVALID = -1,
275 SDL_CONTROLLER_AXIS_LEFTX,
276 SDL_CONTROLLER_AXIS_LEFTY,
277 SDL_CONTROLLER_AXIS_RIGHTX,
278 SDL_CONTROLLER_AXIS_RIGHTY,
279 SDL_CONTROLLER_AXIS_TRIGGERLEFT,
280 SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
281 SDL_CONTROLLER_AXIS_MAX
299 SDL_GameControllerAxis axis);
309 extern DECLSPEC Sint16 SDLCALL
311 SDL_GameControllerAxis axis);
318 SDL_CONTROLLER_BUTTON_INVALID = -1,
319 SDL_CONTROLLER_BUTTON_A,
320 SDL_CONTROLLER_BUTTON_B,
321 SDL_CONTROLLER_BUTTON_X,
322 SDL_CONTROLLER_BUTTON_Y,
323 SDL_CONTROLLER_BUTTON_BACK,
324 SDL_CONTROLLER_BUTTON_GUIDE,
325 SDL_CONTROLLER_BUTTON_START,
326 SDL_CONTROLLER_BUTTON_LEFTSTICK,
327 SDL_CONTROLLER_BUTTON_RIGHTSTICK,
328 SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
329 SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
330 SDL_CONTROLLER_BUTTON_DPAD_UP,
331 SDL_CONTROLLER_BUTTON_DPAD_DOWN,
332 SDL_CONTROLLER_BUTTON_DPAD_LEFT,
333 SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
334 SDL_CONTROLLER_BUTTON_MAX
352 SDL_GameControllerButton button);
361 SDL_GameControllerButton button);
374 extern DECLSPEC
int SDLCALL
SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
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 Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller)
DECLSPEC const char *SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button)
DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index)
SDL_GameControllerButton
Definition: SDL_gamecontroller.h:316
DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char *mappingString)
DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller)
SDL_GameControllerAxis
Definition: SDL_gamecontroller.h:272
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_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms)
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)
DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void)
Definition: SDL_joystick.h:70
Sint32 SDL_JoystickID
Definition: SDL_joystick.h:81
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_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid)
DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString)
DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index)
DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller)
DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller)
DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index)
DECLSPEC Sint16 SDLCALL SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)
DECLSPEC char *SDLCALL SDL_GameControllerMappingForIndex(int mapping_index)
DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index)
Definition: SDL_rwops.h:52