Go to the source code of this file.
|
int | SDL_JoystickInit (void) |
|
void | SDL_JoystickQuit (void) |
|
SDL_JoystickID | SDL_GetNextJoystickInstanceID (void) |
|
int | SDL_GameControllerInitMappings (void) |
|
void | SDL_GameControllerQuitMappings (void) |
|
int | SDL_GameControllerInit (void) |
|
void | SDL_GameControllerQuit (void) |
|
SDL_bool | SDL_GetDriverAndJoystickIndex (int device_index, struct _SDL_JoystickDriver **driver, int *driver_index) |
|
int | SDL_JoystickGetDeviceIndexFromInstanceID (SDL_JoystickID instance_id) |
|
void | SDL_GetJoystickGUIDInfo (SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version) |
|
const char * | SDL_GetCustomJoystickManufacturer (const char *manufacturer) |
|
const char * | SDL_GetCustomJoystickName (Uint16 vendor, Uint16 product) |
|
SDL_GameControllerType | SDL_GetJoystickGameControllerTypeFromGUID (SDL_JoystickGUID guid, const char *name) |
|
SDL_GameControllerType | SDL_GetJoystickGameControllerType (const char *name, Uint16 vendor, Uint16 product, int interface_number, int interface_class, int interface_subclass, int interface_protocol) |
|
SDL_bool | SDL_IsJoystickNintendoSwitchProInputOnly (Uint16 vendor_id, Uint16 product_id) |
|
SDL_bool | SDL_IsJoystickSteamController (Uint16 vendor_id, Uint16 product_id) |
|
SDL_bool | SDL_IsJoystickXInput (SDL_JoystickGUID guid) |
|
SDL_bool | SDL_IsJoystickHIDAPI (SDL_JoystickGUID guid) |
|
SDL_bool | SDL_ShouldIgnoreJoystick (const char *name, SDL_JoystickGUID guid) |
|
SDL_bool | SDL_IsGameControllerNameAndGUID (const char *name, SDL_JoystickGUID guid) |
|
SDL_bool | SDL_ShouldIgnoreGameController (const char *name, SDL_JoystickGUID guid) |
|
void | SDL_GameControllerHandleDelayedGuideButton (SDL_Joystick *joystick) |
|
void | SDL_PrivateJoystickAdded (SDL_JoystickID device_instance) |
|
void | SDL_PrivateJoystickRemoved (SDL_JoystickID device_instance) |
|
int | SDL_PrivateJoystickAxis (SDL_Joystick *joystick, Uint8 axis, Sint16 value) |
|
int | SDL_PrivateJoystickBall (SDL_Joystick *joystick, Uint8 ball, Sint16 xrel, Sint16 yrel) |
|
int | SDL_PrivateJoystickHat (SDL_Joystick *joystick, Uint8 hat, Uint8 value) |
|
int | SDL_PrivateJoystickButton (SDL_Joystick *joystick, Uint8 button, Uint8 state) |
|
void | SDL_PrivateJoystickBatteryLevel (SDL_Joystick *joystick, SDL_JoystickPowerLevel ePowerLevel) |
|
SDL_bool | SDL_PrivateJoystickValid (SDL_Joystick *joystick) |
|
◆ SDL_GameControllerHandleDelayedGuideButton()
void SDL_GameControllerHandleDelayedGuideButton |
( |
SDL_Joystick * |
joystick | ) |
|
◆ SDL_GameControllerInit()
int SDL_GameControllerInit |
( |
void |
| ) |
|
Definition at line 1399 of file SDL_gamecontroller.c.
References SDL_Event::cdevice, i, NULL, SDL_AddEventWatch, SDL_CONTROLLERDEVICEADDED, SDL_GameControllerEventWatcher(), SDL_IsGameController(), SDL_NumJoysticks, SDL_PushEvent, SDL_Event::type, and SDL_ControllerDeviceEvent::which.
Referenced by SDL_InitSubSystem().
◆ SDL_GameControllerInitMappings()
int SDL_GameControllerInitMappings |
( |
void |
| ) |
|
Definition at line 1370 of file SDL_gamecontroller.c.
1372 char szControllerMapPath[1024];
1374 const char *pMappingString =
NULL;
1376 while (pMappingString) {
References i, NULL, s_ControllerMappings, SDL_AddHintCallback, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT, SDL_GameControllerAddMappingsFromFile, SDL_GameControllerIgnoreDevicesChanged(), SDL_GameControllerIgnoreDevicesExceptChanged(), SDL_GameControllerLoadHints(), SDL_GetControllerMappingFilePath(), SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES, SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT, and SDL_PrivateGameControllerAddMapping().
Referenced by SDL_JoystickInit().
◆ SDL_GameControllerQuit()
◆ SDL_GameControllerQuitMappings()
void SDL_GameControllerQuitMappings |
( |
void |
| ) |
|
Definition at line 2005 of file SDL_gamecontroller.c.
2007 ControllerMapping_t *pControllerMap;
References SDL_vidpid_list::entries, NULL, s_pSupportedControllers, SDL_allowed_controllers, SDL_DelEventWatch, SDL_DelHintCallback, SDL_free, SDL_GameControllerEventWatcher(), SDL_GameControllerIgnoreDevicesChanged(), SDL_GameControllerIgnoreDevicesExceptChanged(), SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES, SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT, SDL_ignored_controllers, and SDL_zero.
Referenced by SDL_JoystickQuit().
◆ SDL_GetCustomJoystickManufacturer()
const char* SDL_GetCustomJoystickManufacturer |
( |
const char * |
manufacturer | ) |
|
◆ SDL_GetCustomJoystickName()
const char* SDL_GetCustomJoystickName |
( |
Uint16 |
vendor, |
|
|
Uint16 |
product |
|
) |
| |
◆ SDL_GetDriverAndJoystickIndex()
◆ SDL_GetJoystickGameControllerType()
SDL_GameControllerType SDL_GetJoystickGameControllerType |
( |
const char * |
name, |
|
|
Uint16 |
vendor, |
|
|
Uint16 |
product, |
|
|
int |
interface_number, |
|
|
int |
interface_class, |
|
|
int |
interface_subclass, |
|
|
int |
interface_protocol |
|
) |
| |
Definition at line 1409 of file SDL_joystick.c.
1411 static const int LIBUSB_CLASS_VENDOR_SPEC = 0xFF;
1412 static const int XB360_IFACE_SUBCLASS = 93;
1413 static const int XB360_IFACE_PROTOCOL = 1;
1414 static const int XB360W_IFACE_PROTOCOL = 129;
1415 static const int XBONE_IFACE_SUBCLASS = 71;
1416 static const int XBONE_IFACE_PROTOCOL = 208;
1421 if (interface_class == LIBUSB_CLASS_VENDOR_SPEC &&
1422 interface_subclass == XB360_IFACE_SUBCLASS &&
1423 (interface_protocol == XB360_IFACE_PROTOCOL ||
1424 interface_protocol == XB360W_IFACE_PROTOCOL)) {
1426 static const int SUPPORTED_VENDORS[] = {
1452 if (vendor == SUPPORTED_VENDORS[
i]) {
1459 if (interface_number == 0 &&
1460 interface_class == LIBUSB_CLASS_VENDOR_SPEC &&
1461 interface_subclass == XBONE_IFACE_SUBCLASS &&
1462 interface_protocol == XBONE_IFACE_PROTOCOL) {
1464 static const int SUPPORTED_VENDORS[] = {
1476 if (vendor == SUPPORTED_VENDORS[
i]) {
1484 if (vendor == 0x0000 && product == 0x0000) {
1495 }
else if (vendor == 0x0001 && product == 0x0001) {
References GuessControllerType(), i, k_eControllerType_PS3Controller, k_eControllerType_PS4Controller, k_eControllerType_SwitchInputOnlyController, k_eControllerType_SwitchProController, k_eControllerType_XBox360Controller, k_eControllerType_XBoxOneController, SDL_arraysize, SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO, SDL_CONTROLLER_TYPE_PS3, SDL_CONTROLLER_TYPE_PS4, SDL_CONTROLLER_TYPE_UNKNOWN, SDL_CONTROLLER_TYPE_XBOX360, SDL_CONTROLLER_TYPE_XBOXONE, and SDL_strcmp.
Referenced by SDL_GetJoystickGameControllerTypeFromGUID(), and SDL_ShouldIgnoreJoystick().
◆ SDL_GetJoystickGameControllerTypeFromGUID()
◆ SDL_GetJoystickGUIDInfo()
Definition at line 1337 of file SDL_joystick.c.
1343 guid16[1] == 0x0000 &&
1345 guid16[3] == 0x0000 &&
1351 *vendor = guid16[2];
1354 *product = guid16[4];
1357 *version = guid16[6];
References SDL_JoystickGUID::data, and if.
Referenced by SDL_GetJoystickGameControllerTypeFromGUID(), SDL_GetJoystickGUIDType(), SDL_JoystickGetDeviceProduct(), SDL_JoystickGetDeviceProductVersion(), SDL_JoystickGetDeviceVendor(), SDL_JoystickGetProduct(), SDL_JoystickGetProductVersion(), SDL_JoystickGetVendor(), SDL_ShouldIgnoreGameController(), and SDL_ShouldIgnoreJoystick().
◆ SDL_GetNextJoystickInstanceID()
◆ SDL_IsGameControllerNameAndGUID()
◆ SDL_IsJoystickHIDAPI()
◆ SDL_IsJoystickNintendoSwitchProInputOnly()
◆ SDL_IsJoystickSteamController()
◆ SDL_IsJoystickXInput()
◆ SDL_JoystickGetDeviceIndexFromInstanceID()
int SDL_JoystickGetDeviceIndexFromInstanceID |
( |
SDL_JoystickID |
instance_id | ) |
|
◆ SDL_JoystickInit()
int SDL_JoystickInit |
( |
void |
| ) |
|
Definition at line 201 of file SDL_joystick.c.
216 #if !SDL_EVENTS_DISABLED
References i, NULL, SDL_AddHintCallback, SDL_arraysize, SDL_CreateMutex, SDL_GameControllerInitMappings(), SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, SDL_INIT_EVENTS, SDL_InitSubSystem, SDL_joystick_drivers, SDL_joystick_lock, and SDL_JoystickAllowBackgroundEventsChanged().
Referenced by SDL_InitSubSystem().
◆ SDL_JoystickQuit()
Definition at line 858 of file SDL_joystick.c.
888 #if !SDL_EVENTS_DISABLED
References i, mutex, NULL, SDL_arraysize, SDL_Delay, SDL_DelHintCallback, SDL_DestroyMutex, SDL_free, SDL_GameControllerQuitMappings(), SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, SDL_INIT_EVENTS, SDL_joystick_drivers, SDL_joystick_lock, SDL_joystick_player_count, SDL_joystick_players, SDL_JoystickAllowBackgroundEventsChanged(), SDL_JoystickClose(), SDL_joysticks, SDL_LockJoysticks(), SDL_QuitSubSystem, SDL_UnlockJoysticks(), and SDL_updating_joystick.
Referenced by SDL_QuitSubSystem().
◆ SDL_PrivateJoystickAdded()
Definition at line 921 of file SDL_joystick.c.
923 SDL_JoystickDriver *driver;
924 int driver_device_index;
925 int player_index = -1;
927 if (device_index < 0) {
933 player_index = driver->GetDevicePlayerIndex(driver_device_index);
938 if (player_index >= 0) {
943 #if !SDL_EVENTS_DISABLED
950 event.jdevice.which = device_index;
References SDL_ENABLE, SDL_FindFreePlayerIndex(), SDL_GetDriverAndJoystickIndex(), SDL_GetEventState, SDL_IsGameController, SDL_JOYDEVICEADDED, SDL_JoystickGetDeviceIndexFromInstanceID(), SDL_LockJoysticks(), SDL_PushEvent, SDL_SetJoystickIDForPlayerIndex(), and SDL_UnlockJoysticks().
Referenced by IOS_AddJoystickDevice().
◆ SDL_PrivateJoystickAxis()
int SDL_PrivateJoystickAxis |
( |
SDL_Joystick * |
joystick, |
|
|
Uint8 |
axis, |
|
|
Sint16 |
value |
|
) |
| |
Definition at line 1023 of file SDL_joystick.c.
1026 SDL_JoystickAxisInfo *info;
1029 if (
axis >= joystick->naxes) {
1033 info = &joystick->axes[
axis];
1034 if (!info->has_initial_value ||
1036 info->initial_value =
value;
1037 info->value =
value;
1039 info->has_initial_value =
SDL_TRUE;
1043 if (
value == info->value) {
1046 if (!info->sent_initial_value) {
1049 if (
SDL_abs(
value - info->value) <= MAX_ALLOWED_JITTER) {
1052 info->sent_initial_value =
SDL_TRUE;
1053 info->value =
value;
1061 if ((
value > info->zero &&
value >= info->value) ||
1068 info->value =
value;
1072 #if !SDL_EVENTS_DISABLED
1076 event.jaxis.which = joystick->instance_id;
1077 event.jaxis.axis =
axis;
1078 event.jaxis.value =
value;
References axis, SDL_abs, SDL_ENABLE, SDL_GetEventState, SDL_JOYAXISMOTION, SDL_JOYSTICK_AXIS_MAX, SDL_PrivateJoystickAxis(), SDL_PrivateJoystickShouldIgnoreEvent(), SDL_PushEvent, SDL_TRUE, and zero.
Referenced by IOS_AccelerometerUpdate(), IOS_MFIJoystickUpdate(), SDL_JoystickUpdate(), and SDL_PrivateJoystickAxis().
◆ SDL_PrivateJoystickBall()
int SDL_PrivateJoystickBall |
( |
SDL_Joystick * |
joystick, |
|
|
Uint8 |
ball, |
|
|
Sint16 |
xrel, |
|
|
Sint16 |
yrel |
|
) |
| |
◆ SDL_PrivateJoystickBatteryLevel()
◆ SDL_PrivateJoystickButton()
int SDL_PrivateJoystickButton |
( |
SDL_Joystick * |
joystick, |
|
|
Uint8 |
button, |
|
|
Uint8 |
state |
|
) |
| |
Definition at line 1162 of file SDL_joystick.c.
1165 #if !SDL_EVENTS_DISABLED
1182 if (
button >= joystick->nbuttons) {
1202 #if !SDL_EVENTS_DISABLED
1204 event.jbutton.which = joystick->instance_id;
1205 event.jbutton.button =
button;
1206 event.jbutton.state =
state;
References button, SDL_ENABLE, SDL_GetEventState, SDL_JOYBUTTONDOWN, SDL_JOYBUTTONUP, SDL_PRESSED, SDL_PrivateJoystickShouldIgnoreEvent(), SDL_PushEvent, SDL_RELEASED, and state.
Referenced by IOS_MFIJoystickUpdate(), and SDL_JoystickUpdate().
◆ SDL_PrivateJoystickHat()
int SDL_PrivateJoystickHat |
( |
SDL_Joystick * |
joystick, |
|
|
Uint8 |
hat, |
|
|
Uint8 |
value |
|
) |
| |
◆ SDL_PrivateJoystickRemoved()
Definition at line 987 of file SDL_joystick.c.
989 SDL_Joystick *joystick;
992 #if !SDL_EVENTS_DISABLED
998 event.jdevice.which = device_instance;
1006 for (joystick =
SDL_joysticks; joystick; joystick = joystick->next) {
1007 if (joystick->instance_id == device_instance) {
1009 joystick->force_recentering =
SDL_TRUE;
1016 if (player_index >= 0) {
References SDL_ENABLE, SDL_FALSE, SDL_GetEventState, SDL_GetPlayerIndexForJoystickID(), SDL_JOYDEVICEREMOVED, SDL_joystick_players, SDL_joysticks, SDL_LockJoysticks(), SDL_PushEvent, SDL_TRUE, SDL_UnlockJoysticks(), and UpdateEventsForDeviceRemoval().
Referenced by IOS_RemoveJoystickDevice().
◆ SDL_PrivateJoystickValid()
SDL_bool SDL_PrivateJoystickValid |
( |
SDL_Joystick * |
joystick | ) |
|
Definition at line 480 of file SDL_joystick.c.
484 if (joystick ==
NULL) {
References NULL, SDL_FALSE, SDL_SetError, and SDL_TRUE.
Referenced by SDL_HapticOpenFromJoystick(), SDL_JoystickClose(), SDL_JoystickCurrentPowerLevel(), SDL_JoystickGetAttached(), SDL_JoystickGetAxis(), SDL_JoystickGetAxisInitialState(), SDL_JoystickGetBall(), SDL_JoystickGetButton(), SDL_JoystickGetGUID(), SDL_JoystickGetHat(), SDL_JoystickGetPlayerIndex(), SDL_JoystickInstanceID(), SDL_JoystickIsHaptic(), SDL_JoystickName(), SDL_JoystickNumAxes(), SDL_JoystickNumBalls(), SDL_JoystickNumButtons(), SDL_JoystickNumHats(), SDL_JoystickRumble(), and SDL_JoystickSetPlayerIndex().
◆ SDL_ShouldIgnoreGameController()
Definition at line 1511 of file SDL_gamecontroller.c.
1519 #if defined(__LINUX__)
1536 #if defined(__LINUX__)
1537 bSteamVirtualGamepad = (vendor == 0x28DE && product == 0x11FF);
1538 #elif defined(__MACOSX__)
1539 bSteamVirtualGamepad = (vendor == 0x045E && product == 0x028E && version == 1);
1540 #elif defined(__WIN32__)
1544 if (bSteamVirtualGamepad) {
References SDL_vidpid_list::entries, i, MAKE_VIDPID, SDL_vidpid_list::num_entries, SDL_allowed_controllers, SDL_FALSE, SDL_GetHintBoolean, SDL_GetJoystickGUIDInfo(), SDL_ignored_controllers, SDL_strstr, and SDL_TRUE.
Referenced by SDL_ShouldIgnoreJoystick().
◆ SDL_ShouldIgnoreJoystick()
Definition at line 1698 of file SDL_joystick.c.
1703 static Uint32 joystick_blacklist[] = {
1810 if (
id == joystick_blacklist[
i]) {
References i, MAKE_VIDPID, NULL, SDL_arraysize, SDL_CONTROLLER_TYPE_PS4, SDL_FALSE, SDL_GetJoystickGameControllerType(), SDL_GetJoystickGUIDInfo(), SDL_IsGameControllerNameAndGUID(), SDL_IsPS4RemapperRunning(), SDL_ShouldIgnoreGameController(), and SDL_TRUE.
@ k_eControllerType_SteamController
@ k_eControllerType_SwitchInputOnlyController
#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
A variable that lets you enable joystick (and gamecontroller) events even when your app is in the bac...
SDL_bool SDL_IsGameController(int device_index)
static int SDL_GameControllerEventWatcher(void *userdata, SDL_Event *event)
static SDL_INLINE EControllerType GuessControllerType(int nVID, int nPID)
#define SDL_IsGameController
static SDL_GameController * SDL_gamecontrollers
#define SDL_UnlockJoysticks
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
@ k_eControllerType_SwitchProController
int SDL_JoystickGetDeviceIndexFromInstanceID(SDL_JoystickID instance_id)
static SDL_bool SDL_IsPS4RemapperRunning(void)
@ SDL_CONTROLLER_TYPE_UNKNOWN
static void SDL_GameControllerIgnoreDevicesChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
static SDL_bool SDL_SetJoystickIDForPlayerIndex(int player_index, SDL_JoystickID instance_id)
#define SDL_AtomicIncRef(a)
Increment an atomic variable used as a reference count.
#define SDL_QuitSubSystem
static const SDL_INLINE char * GuessControllerName(int nVID, int nPID)
int SDL_NumJoysticks(void)
void SDL_UnlockJoysticks(void)
SDL_GameControllerType SDL_GetJoystickGameControllerType(const char *name, Uint16 vendor, Uint16 product, int interface_number, int interface_class, int interface_subclass, int interface_protocol)
SDL_JoystickID SDL_JoystickGetDeviceInstanceID(int device_index)
#define SDL_InitSubSystem
static ControllerMapping_t * s_pSupportedControllers
@ SDL_CONTROLLERDEVICEADDED
SDL_bool SDL_ShouldIgnoreGameController(const char *name, SDL_JoystickGUID guid)
int SDL_PrivateJoystickAxis(SDL_Joystick *joystick, Uint8 axis, Sint16 value)
@ k_eControllerType_PS4Controller
@ SDL_CONTROLLER_TYPE_PS3
#define SDL_GetHintBoolean
@ SDL_CONTROLLER_TYPE_PS4
SDL_bool SDL_IsJoystickXInput(SDL_JoystickGUID guid)
#define SDL_GetEventState(type)
@ k_eControllerType_XBox360Controller
void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version)
static SDL_bool SDL_updating_joystick
static void UpdateEventsForDeviceRemoval()
#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT
static SDL_vidpid_list SDL_ignored_controllers
static SDL_bool SDL_PrivateJoystickShouldIgnoreEvent()
GLuint const GLchar * name
static const char * s_ControllerMappings[]
int SDL_GameControllerInitMappings(void)
@ k_eControllerType_SteamControllerV2
SDL_bool SDL_GetDriverAndJoystickIndex(int device_index, SDL_JoystickDriver **driver, int *driver_index)
#define MAKE_VIDPID(VID, PID)
static SDL_atomic_t SDL_next_joystick_instance_id
static void SDL_JoystickAllowBackgroundEventsChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
static void SDL_GameControllerLoadHints()
static SDL_mutex * SDL_joystick_lock
#define SDL_JOYSTICK_AXIS_MAX
static int SDL_joystick_player_count
void SDL_LockJoysticks(void)
static SDL_JoystickDriver * SDL_joystick_drivers[]
#define SDL_arraysize(array)
static int SDL_PrivateGameControllerAddMapping(const char *mappingString, SDL_ControllerMappingPriority priority)
void SDL_GameControllerQuitMappings(void)
#define SDL_AddHintCallback
void SDL_JoystickClose(SDL_Joystick *joystick)
static SDL_vidpid_list SDL_allowed_controllers
GLsizei const GLfloat * value
static ControllerMapping_t * SDL_PrivateGetControllerMappingForNameAndGUID(const char *name, SDL_JoystickGUID guid)
void SDL_GameControllerClose(SDL_GameController *gamecontroller)
@ k_eControllerType_PS3Controller
SDL_bool SDL_IsGameControllerNameAndGUID(const char *name, SDL_JoystickGUID guid)
#define SDL_AddEventWatch
static SDL_JoystickID * SDL_joystick_players
static SDL_Joystick * SDL_joysticks
static int SDL_GetPlayerIndexForJoystickID(SDL_JoystickID instance_id)
@ SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT
@ SDL_CONTROLLER_TYPE_XBOX360
static int SDL_PrivateGameControllerButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button, Uint8 state)
#define SDL_DelHintCallback
#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES
SDL_ControllerDeviceEvent cdevice
@ SDL_CONTROLLER_TYPE_XBOXONE
GLuint GLuint GLsizei GLenum type
#define SDL_GameControllerAddMappingsFromFile(file)
#define SDL_LockJoysticks
@ k_eControllerType_XBoxOneController
@ SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
static int SDL_FindFreePlayerIndex()
static SDL_bool SDL_GetControllerMappingFilePath(char *path, size_t size)
#define SDL_DelEventWatch
static void SDL_GameControllerIgnoreDevicesExceptChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
@ SDL_CONTROLLER_BUTTON_GUIDE