SDL
2.0
|
Go to the source code of this file.
void SDL_GameControllerHandleDelayedGuideButton | ( | SDL_Joystick * | joystick | ) |
Definition at line 2151 of file SDL_gamecontroller.c.
References SDL_GameController::joystick, SDL_CONTROLLER_BUTTON_GUIDE, SDL_gamecontrollers, SDL_PrivateGameControllerButton(), and SDL_RELEASED.
Referenced by SDL_JoystickUpdate().
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().
int SDL_GameControllerInitMappings | ( | void | ) |
Definition at line 1370 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 1994 of file SDL_gamecontroller.c.
References SDL_GameControllerClose(), SDL_gamecontrollers, SDL_LockJoysticks, and SDL_UnlockJoysticks.
Referenced by SDL_QuitSubSystem().
Definition at line 2005 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().
const char* SDL_GetCustomJoystickManufacturer | ( | const char * | manufacturer | ) |
Definition at line 1386 of file SDL_joystick.c.
References GuessControllerName().
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 1409 of file SDL_joystick.c.
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_GameControllerType SDL_GetJoystickGameControllerTypeFromGUID | ( | SDL_JoystickGUID | guid, |
const char * | name | ||
) |
Definition at line 1392 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_GameControllerGetType(), and SDL_GameControllerTypeForIndex().
void SDL_GetJoystickGUIDInfo | ( | SDL_JoystickGUID | guid, |
Uint16 * | vendor, | ||
Uint16 * | product, | ||
Uint16 * | version | ||
) |
Definition at line 1337 of file SDL_joystick.c.
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_JoystickID SDL_GetNextJoystickInstanceID | ( | void | ) |
Definition at line 250 of file SDL_joystick.c.
References SDL_AtomicIncRef, and SDL_next_joystick_instance_id.
Referenced by IOS_AddJoystickDevice().
SDL_bool SDL_IsGameControllerNameAndGUID | ( | const char * | name, |
SDL_JoystickGUID | guid | ||
) |
Definition at line 1486 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 1547 of file SDL_joystick.c.
References SDL_JoystickGUID::data, SDL_FALSE, and SDL_TRUE.
Referenced by SDL_PrivateGetControllerMappingForGUID(), and SDL_PrivateGetControllerMappingForNameAndGUID().
Definition at line 1526 of file SDL_joystick.c.
References GuessControllerType(), and k_eControllerType_SwitchInputOnlyController.
Definition at line 1533 of file SDL_joystick.c.
References GuessControllerType(), k_eControllerType_SteamController, and k_eControllerType_SteamControllerV2.
SDL_bool SDL_IsJoystickXInput | ( | SDL_JoystickGUID | guid | ) |
Definition at line 1541 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 1899 of file SDL_joystick.c.
References i, SDL_JoystickGetDeviceInstanceID(), SDL_LockJoysticks(), SDL_NumJoysticks(), and SDL_UnlockJoysticks().
Referenced by SDL_PrivateJoystickAdded(), and SDL_SetJoystickIDForPlayerIndex().
int SDL_JoystickInit | ( | void | ) |
Definition at line 201 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 858 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 921 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().
Referenced by IOS_AddJoystickDevice().
Definition at line 1023 of file SDL_joystick.c.
References axis, SDL_JoystickAxisInfo::has_initial_value, SDL_JoystickAxisInfo::has_second_value, SDL_JoystickAxisInfo::initial_value, SDL_abs, SDL_ENABLE, SDL_GetEventState, SDL_JOYAXISMOTION, SDL_JOYSTICK_AXIS_MAX, SDL_PrivateJoystickAxis(), 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(), SDL_JoystickUpdate(), and SDL_PrivateJoystickAxis().
Definition at line 1126 of file SDL_joystick.c.
References SDL_ENABLE, SDL_GetEventState, SDL_JOYBALLMOTION, SDL_PrivateJoystickShouldIgnoreEvent(), and SDL_PushEvent.
void SDL_PrivateJoystickBatteryLevel | ( | SDL_Joystick * | joystick, |
SDL_JoystickPowerLevel | ePowerLevel | ||
) |
Definition at line 2035 of file SDL_joystick.c.
Definition at line 1162 of file SDL_joystick.c.
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().
Definition at line 1086 of file SDL_joystick.c.
References SDL_ENABLE, SDL_GetEventState, SDL_HAT_CENTERED, SDL_JOYHATMOTION, SDL_PrivateJoystickShouldIgnoreEvent(), and SDL_PushEvent.
Referenced by IOS_MFIJoystickUpdate(), and SDL_JoystickUpdate().
void SDL_PrivateJoystickRemoved | ( | SDL_JoystickID | device_instance | ) |
Definition at line 987 of file SDL_joystick.c.
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_bool SDL_PrivateJoystickValid | ( | SDL_Joystick * | joystick | ) |
Definition at line 480 of file SDL_joystick.c.
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_bool SDL_ShouldIgnoreGameController | ( | const char * | name, |
SDL_JoystickGUID | guid | ||
) |
Definition at line 1511 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 1698 of file SDL_joystick.c.
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.