|
SDL
2.0
|
Include dependency graph for SDL_joystick_c.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | SDL_InputMapping |
| struct | SDL_GamepadMapping |
Enumerations | |
| enum | EMappingKind { EMappingKind_None = 0 , EMappingKind_Button = 1 , EMappingKind_Axis = 2 , EMappingKind_Hat = 3 } |
| enum EMappingKind |
| Enumerator | |
|---|---|
| EMappingKind_None | |
| EMappingKind_Button | |
| EMappingKind_Axis | |
| EMappingKind_Hat | |
Definition at line 134 of file SDL_joystick_c.h.
| char* SDL_CreateJoystickName | ( | Uint16 | vendor, |
| Uint16 | product, | ||
| const char * | vendor_name, | ||
| const char * | product_name | ||
| ) |
Definition at line 1649 of file SDL_joystick.c.
References GuessControllerName(), i, NULL, PrefixMatch(), SDL_arraysize, SDL_malloc, SDL_memcpy, SDL_memmove, SDL_snprintf, SDL_strdup, SDL_strlen, and SDL_strncasecmp.
| void SDL_GameControllerHandleDelayedGuideButton | ( | SDL_Joystick * | joystick | ) |
Definition at line 2596 of file SDL_gamecontroller.c.
References joystick, SDL_CONTROLLER_BUTTON_GUIDE, SDL_gamecontrollers, SDL_PrivateGameControllerButton(), and SDL_RELEASED.
Referenced by SDL_JoystickUpdate().
Definition at line 1629 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().
Definition at line 1600 of file SDL_gamecontroller.c.
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().
Definition at line 2439 of file SDL_gamecontroller.c.
References SDL_GameControllerClose(), SDL_gamecontrollers, SDL_LockJoysticks, and SDL_UnlockJoysticks.
Referenced by SDL_QuitSubSystem().
Definition at line 2450 of file SDL_gamecontroller.c.
References SDL_vidpid_list::entries, ControllerMapping_t::mapping, ControllerMapping_t::name, ControllerMapping_t::next, 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_bool SDL_GetDriverAndJoystickIndex | ( | int | device_index, |
| struct _SDL_JoystickDriver ** | driver, | ||
| int * | driver_index | ||
| ) |
| 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 1771 of file SDL_joystick.c.
References GuessControllerType(), i, k_eControllerType_PS3Controller, k_eControllerType_PS4Controller, k_eControllerType_PS5Controller, 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_PS5, SDL_CONTROLLER_TYPE_UNKNOWN, SDL_CONTROLLER_TYPE_VIRTUAL, SDL_CONTROLLER_TYPE_XBOX360, SDL_CONTROLLER_TYPE_XBOXONE, and SDL_strcmp.
Referenced by SDL_GetJoystickGameControllerTypeFromGUID(), SDL_GetJoystickGameControllerTypeFromVIDPID(), and SDL_ShouldIgnoreJoystick().
| SDL_GameControllerType SDL_GetJoystickGameControllerTypeFromGUID | ( | SDL_JoystickGUID | guid, |
| const char * | name | ||
| ) |
Definition at line 1754 of file SDL_joystick.c.
References NULL, SDL_CONTROLLER_TYPE_UNKNOWN, SDL_CONTROLLER_TYPE_XBOXONE, SDL_GetJoystickGameControllerType(), SDL_GetJoystickGUIDInfo(), and SDL_IsJoystickXInput().
Referenced by SDL_CreateMappingForHIDAPIController(), SDL_GameControllerGetType(), and SDL_GameControllerTypeForIndex().
| SDL_GameControllerType SDL_GetJoystickGameControllerTypeFromVIDPID | ( | Uint16 | vendor, |
| Uint16 | product | ||
| ) |
Definition at line 1748 of file SDL_joystick.c.
References NULL, and SDL_GetJoystickGameControllerType().
| void SDL_GetJoystickGUIDInfo | ( | SDL_JoystickGUID | guid, |
| Uint16 * | vendor, | ||
| Uint16 * | product, | ||
| Uint16 * | version | ||
| ) |
Definition at line 1599 of file SDL_joystick.c.
References SDL_JoystickGUID::data, and if.
Referenced by SDL_CreateMappingForHIDAPIController(), SDL_GetJoystickGameControllerTypeFromGUID(), SDL_GetJoystickGUIDType(), SDL_JoystickGetDeviceProduct(), SDL_JoystickGetDeviceProductVersion(), SDL_JoystickGetDeviceVendor(), SDL_JoystickGetProduct(), SDL_JoystickGetProductVersion(), SDL_JoystickGetVendor(), SDL_ShouldIgnoreGameController(), and SDL_ShouldIgnoreJoystick().
| SDL_JoystickID SDL_GetNextJoystickInstanceID | ( | void | ) |
Definition at line 262 of file SDL_joystick.c.
References SDL_AtomicIncRef, and SDL_next_joystick_instance_id.
| SDL_bool SDL_IsGameControllerNameAndGUID | ( | const char * | name, |
| SDL_JoystickGUID | guid | ||
| ) |
Definition at line 1716 of file SDL_gamecontroller.c.
References SDL_FALSE, SDL_PrivateGetControllerMappingForNameAndGUID(), and SDL_TRUE.
Referenced by SDL_ShouldIgnoreJoystick().
| SDL_bool SDL_IsJoystickHIDAPI | ( | SDL_JoystickGUID | guid | ) |
Definition at line 1968 of file SDL_joystick.c.
References SDL_JoystickGUID::data, SDL_FALSE, and SDL_TRUE.
Referenced by SDL_PrivateGetControllerMappingForGUID().
Definition at line 1933 of file SDL_joystick.c.
References GuessControllerType(), k_eControllerType_SwitchInputOnlyController, and k_eControllerType_SwitchProController.
Referenced by SDL_CreateMappingForHIDAPIController().
Definition at line 1941 of file SDL_joystick.c.
References GuessControllerType(), and k_eControllerType_SwitchInputOnlyController.
Definition at line 1919 of file SDL_joystick.c.
References GuessControllerType(), and k_eControllerType_PS4Controller.
Definition at line 1926 of file SDL_joystick.c.
References GuessControllerType(), and k_eControllerType_PS5Controller.
| SDL_bool SDL_IsJoystickRAWINPUT | ( | SDL_JoystickGUID | guid | ) |
Definition at line 1974 of file SDL_joystick.c.
References SDL_JoystickGUID::data, SDL_FALSE, and SDL_TRUE.
Referenced by SDL_PrivateGetControllerMappingForGUID().
Definition at line 1948 of file SDL_joystick.c.
References GuessControllerType(), k_eControllerType_SteamController, and k_eControllerType_SteamControllerV2.
Referenced by SDL_CreateMappingForHIDAPIController().
| SDL_bool SDL_IsJoystickVirtual | ( | SDL_JoystickGUID | guid | ) |
Definition at line 1980 of file SDL_joystick.c.
References SDL_JoystickGUID::data, SDL_FALSE, and SDL_TRUE.
Referenced by SDL_GetJoystickGUIDType().
| SDL_bool SDL_IsJoystickWGI | ( | SDL_JoystickGUID | guid | ) |
Definition at line 1962 of file SDL_joystick.c.
References SDL_JoystickGUID::data, SDL_FALSE, and SDL_TRUE.
Referenced by SDL_GetJoystickGUIDType(), and SDL_PrivateGetControllerMappingForNameAndGUID().
Definition at line 1894 of file SDL_joystick.c.
References SDL_FALSE, SDL_TRUE, USB_PRODUCT_XBOX_ONE_ELITE_SERIES_1, USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2, USB_PRODUCT_XBOX_ONE_ELITE_SERIES_2_BLUETOOTH, and USB_VENDOR_MICROSOFT.
Referenced by SDL_CreateMappingForHIDAPIController().
Definition at line 1907 of file SDL_joystick.c.
References SDL_FALSE, SDL_TRUE, USB_PRODUCT_XBOX_ONE_SERIES_X, USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH, and USB_VENDOR_MICROSOFT.
Referenced by SDL_CreateMappingForHIDAPIController().
| SDL_bool SDL_IsJoystickXInput | ( | SDL_JoystickGUID | guid | ) |
Definition at line 1956 of file SDL_joystick.c.
References SDL_JoystickGUID::data, SDL_FALSE, and SDL_TRUE.
Referenced by SDL_GetJoystickGameControllerTypeFromGUID(), SDL_GetJoystickGUIDType(), and SDL_PrivateGetControllerMappingForGUID().
| int SDL_JoystickGetDeviceIndexFromInstanceID | ( | SDL_JoystickID | instance_id | ) |
Definition at line 2343 of file SDL_joystick.c.
References i, SDL_JoystickGetDeviceInstanceID(), SDL_LockJoysticks(), SDL_NumJoysticks(), and SDL_UnlockJoysticks().
Referenced by SDL_PrivateJoystickAdded(), and SDL_SetJoystickIDForPlayerIndex().
Definition at line 213 of file SDL_joystick.c.
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().
Definition at line 1045 of file SDL_joystick.c.
References i, mutex, NULL, SDL_JoystickDriver::Quit, 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().
| void SDL_PrivateJoystickAdded | ( | SDL_JoystickID | device_instance | ) |
Definition at line 1145 of file SDL_joystick.c.
References SDL_JoystickDriver::GetDevicePlayerIndex, SDL_ENABLE, SDL_FindFreePlayerIndex(), SDL_GetDriverAndJoystickIndex(), SDL_GetEventState, SDL_IsGameController, SDL_JOYDEVICEADDED, SDL_JoystickGetDeviceIndexFromInstanceID(), SDL_LockJoysticks(), SDL_PushEvent, SDL_SetJoystickIDForPlayerIndex(), and SDL_UnlockJoysticks().
| void SDL_PrivateJoystickAddSensor | ( | SDL_Joystick * | joystick, |
| SDL_SensorType | type | ||
| ) |
Definition at line 1130 of file SDL_joystick.c.
References joystick, SDL_realloc, SDL_zerop, and SDL_JoystickSensorInfo::type.
Referenced by IOS_JoystickOpen().
Definition at line 1108 of file SDL_joystick.c.
References SDL_JoystickTouchpadInfo::fingers, joystick, SDL_JoystickTouchpadInfo::nfingers, NULL, SDL_calloc, and SDL_realloc.
Referenced by IOS_JoystickOpen().
Definition at line 1295 of file SDL_joystick.c.
References axis, SDL_JoystickAxisInfo::has_initial_value, SDL_JoystickAxisInfo::has_second_value, SDL_JoystickAxisInfo::initial_value, joystick, SDL_abs, SDL_ENABLE, SDL_GetEventState, SDL_JOYAXISMOTION, SDL_JOYSTICK_AXIS_MAX, SDL_PrivateJoystickShouldIgnoreEvent(), SDL_PushEvent, SDL_TRUE, SDL_JoystickAxisInfo::sent_initial_value, SDL_JoystickAxisInfo::value, SDL_JoystickAxisInfo::zero, and zero.
Referenced by IOS_AccelerometerUpdate(), IOS_MFIJoystickUpdate(), and SDL_PrivateJoystickForceRecentering().
Definition at line 1397 of file SDL_joystick.c.
References joystick, SDL_ENABLE, SDL_GetEventState, SDL_JOYBALLMOTION, SDL_PrivateJoystickShouldIgnoreEvent(), and SDL_PushEvent.
| void SDL_PrivateJoystickBatteryLevel | ( | SDL_Joystick * | joystick, |
| SDL_JoystickPowerLevel | ePowerLevel | ||
| ) |
Definition at line 2487 of file SDL_joystick.c.
References joystick.
Referenced by IOS_MFIJoystickUpdate().
Definition at line 1433 of file SDL_joystick.c.
References button, joystick, SDL_ENABLE, SDL_GetEventState, SDL_JOYBUTTONDOWN, SDL_JOYBUTTONUP, SDL_PRESSED, SDL_PrivateJoystickShouldIgnoreEvent(), SDL_PushEvent, SDL_RELEASED, and state.
Referenced by IOS_MFIJoystickUpdate(), and SDL_PrivateJoystickForceRecentering().
| SDL_bool SDL_PrivateJoystickGetAutoGamepadMapping | ( | int | device_index, |
| SDL_GamepadMapping * | out | ||
| ) |
Definition at line 574 of file SDL_joystick.c.
References SDL_JoystickDriver::GetGamepadMapping, SDL_FALSE, SDL_GetDriverAndJoystickIndex(), SDL_LockJoysticks(), and SDL_UnlockJoysticks().
Referenced by SDL_PrivateGetControllerMapping().
Definition at line 1357 of file SDL_joystick.c.
References joystick, SDL_ENABLE, SDL_GetEventState, SDL_HAT_CENTERED, SDL_JOYHATMOTION, SDL_PrivateJoystickShouldIgnoreEvent(), and SDL_PushEvent.
Referenced by IOS_MFIJoystickUpdate(), and SDL_PrivateJoystickForceRecentering().
| void SDL_PrivateJoystickRemoved | ( | SDL_JoystickID | device_instance | ) |
Definition at line 1253 of file SDL_joystick.c.
References joystick, NULL, SDL_ENABLE, SDL_FALSE, SDL_GetEventState, SDL_GetPlayerIndexForJoystickID(), SDL_JOYDEVICEREMOVED, SDL_joystick_players, SDL_joysticks, SDL_LockJoysticks(), SDL_PrivateJoystickForceRecentering(), SDL_PushEvent, SDL_UnlockJoysticks(), SDL_zero, and UpdateEventsForDeviceRemoval().
Referenced by IOS_RemoveJoystickDevice().
| int SDL_PrivateJoystickSensor | ( | SDL_Joystick * | joystick, |
| SDL_SensorType | type, | ||
| const float * | data, | ||
| int | num_values | ||
| ) |
Definition at line 2586 of file SDL_joystick.c.
References SDL_JoystickSensorInfo::data, SDL_JoystickSensorInfo::enabled, i, joystick, SDL_arraysize, SDL_CONTROLLERSENSORUPDATE, SDL_ENABLE, SDL_GetEventState, SDL_memcmp, SDL_memcpy, SDL_memset, SDL_min, SDL_PushEvent, and SDL_JoystickSensorInfo::type.
Referenced by IOS_MFIJoystickUpdate().
| int SDL_PrivateJoystickTouchpad | ( | SDL_Joystick * | joystick, |
| int | touchpad, | ||
| int | finger, | ||
| Uint8 | state, | ||
| float | x, | ||
| float | y, | ||
| float | pressure | ||
| ) |
Definition at line 2501 of file SDL_joystick.c.
References SDL_JoystickTouchpadInfo::fingers, joystick, SDL_JoystickTouchpadInfo::nfingers, SDL_JoystickTouchpadFingerInfo::pressure, SDL_CONTROLLERTOUCHPADDOWN, SDL_CONTROLLERTOUCHPADMOTION, SDL_CONTROLLERTOUCHPADUP, SDL_ENABLE, SDL_GetEventState, SDL_PushEvent, SDL_JoystickTouchpadFingerInfo::state, state, SDL_JoystickTouchpadFingerInfo::x, and SDL_JoystickTouchpadFingerInfo::y.
Referenced by IOS_MFIJoystickUpdate(), and SDL_PrivateJoystickForceRecentering().
| SDL_bool SDL_PrivateJoystickValid | ( | SDL_Joystick * | joystick | ) |
Definition at line 559 of file SDL_joystick.c.
References joystick, 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_JoystickGetSerial(), SDL_JoystickHasLED(), SDL_JoystickInstanceID(), SDL_JoystickIsHaptic(), SDL_JoystickName(), SDL_JoystickNumAxes(), SDL_JoystickNumBalls(), SDL_JoystickNumButtons(), SDL_JoystickNumHats(), SDL_JoystickRumble(), SDL_JoystickRumbleTriggers(), SDL_JoystickSetLED(), and SDL_JoystickSetPlayerIndex().
| SDL_bool SDL_ShouldIgnoreGameController | ( | const char * | name, |
| SDL_JoystickGUID | guid | ||
| ) |
Definition at line 1741 of file SDL_gamecontroller.c.
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_bool SDL_ShouldIgnoreJoystick | ( | const char * | name, |
| SDL_JoystickGUID | guid | ||
| ) |
Definition at line 2140 of file SDL_joystick.c.
References i, MAKE_VIDPID, NULL, SDL_arraysize, SDL_CONTROLLER_TYPE_PS4, SDL_CONTROLLER_TYPE_PS5, SDL_FALSE, SDL_GetJoystickGameControllerType(), SDL_GetJoystickGUIDInfo(), SDL_IsGameControllerNameAndGUID(), SDL_IsPS4RemapperRunning(), SDL_ShouldIgnoreGameController(), and SDL_TRUE.