From 2d7156b910363de2ac5b2f439f82483046cf82b5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 14 Jul 2024 15:22:03 -0700 Subject: [PATCH] Renamed *FromID() to *ForID() While it makes sense to get an object pointer from an object ID, you want to get object attributes for an ID, otherwise e.g. GetNameFromID() sounds like it's a name ID, not an object ID. This is also consistent with the function naming convention in SDL2. --- docs/README-migration.md | 50 ++++++++++++++-------------- include/SDL3/SDL_gamepad.h | 42 ++++++++++++------------ include/SDL3/SDL_haptic.h | 4 +-- include/SDL3/SDL_joystick.h | 36 ++++++++++----------- include/SDL3/SDL_keyboard.h | 4 +-- include/SDL3/SDL_mouse.h | 4 +-- include/SDL3/SDL_sensor.h | 6 ++-- src/dynapi/SDL_dynapi.sym | 48 +++++++++++++-------------- src/dynapi/SDL_dynapi_overrides.h | 48 +++++++++++++-------------- src/dynapi/SDL_dynapi_procs.h | 48 +++++++++++++-------------- src/events/SDL_keyboard.c | 2 +- src/events/SDL_mouse.c | 4 +-- src/haptic/SDL_haptic.c | 2 +- src/joystick/SDL_gamepad.c | 52 ++++++++++++++--------------- src/joystick/SDL_joystick.c | 54 +++++++++++++++---------------- src/joystick/SDL_joystick_c.h | 2 +- src/sensor/SDL_sensor.c | 6 ++-- test/testhaptic.c | 4 +-- test/testhotplug.c | 4 +-- test/testrumble.c | 2 +- test/testsensor.c | 8 ++--- 21 files changed, 215 insertions(+), 215 deletions(-) diff --git a/docs/README-migration.md b/docs/README-migration.md index c3433d39c9411..fb52626e583e6 100644 --- a/docs/README-migration.md +++ b/docs/README-migration.md @@ -461,7 +461,7 @@ SDL_gamecontroller.h has been renamed SDL_gamepad.h, and all APIs have been rena The SDL_EVENT_GAMEPAD_ADDED event now provides the joystick instance ID in the which member of the cdevice event structure. -The functions SDL_GetGamepads(), SDL_GetGamepadNameFromID(), SDL_GetGamepadPathFromID(), SDL_GetGamepadPlayerIndexFromID(), SDL_GetGamepadGUIDFromID(), SDL_GetGamepadVendorFromID(), SDL_GetGamepadProductFromID(), SDL_GetGamepadProductVersionFromID(), and SDL_GetGamepadTypeFromID() have been added to directly query the list of available gamepads. +The functions SDL_GetGamepads(), SDL_GetGamepadNameForID(), SDL_GetGamepadPathForID(), SDL_GetGamepadPlayerIndexForID(), SDL_GetGamepadGUIDForID(), SDL_GetGamepadVendorForID(), SDL_GetGamepadProductForID(), SDL_GetGamepadProductVersionForID(), and SDL_GetGamepadTypeForID() have been added to directly query the list of available gamepads. The gamepad face buttons have been renamed from A/B/X/Y to North/South/East/West to indicate that they are positional rather than hardware-specific. You can use SDL_GetGamepadButtonLabel() to get the labels for the face buttons, e.g. A/B/X/Y or Cross/Circle/Square/Triangle. The hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS is ignored, and mappings that use this hint are translated correctly into positional buttons. Applications should provide a way for users to swap between South/East as their accept/cancel buttons, as this varies based on region and muscle memory. You can use an approach similar to the following to handle this: @@ -624,12 +624,12 @@ The following functions have been removed: * SDL_GameControllerHasLED() - replaced with SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN * SDL_GameControllerHasRumble() - replaced with SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN * SDL_GameControllerHasRumbleTriggers() - replaced with SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN -* SDL_GameControllerMappingForDeviceIndex() - replaced with SDL_GetGamepadMappingFromID() +* SDL_GameControllerMappingForDeviceIndex() - replaced with SDL_GetGamepadMappingForID() * SDL_GameControllerMappingForIndex() - replaced with SDL_GetGamepadMappings() -* SDL_GameControllerNameForIndex() - replaced with SDL_GetGamepadNameFromID() +* SDL_GameControllerNameForIndex() - replaced with SDL_GetGamepadNameForID() * SDL_GameControllerNumMappings() - replaced with SDL_GetGamepadMappings() -* SDL_GameControllerPathForIndex() - replaced with SDL_GetGamepadPathFromID() -* SDL_GameControllerTypeForIndex() - replaced with SDL_GetGamepadTypeFromID() +* SDL_GameControllerPathForIndex() - replaced with SDL_GetGamepadPathForID() +* SDL_GameControllerTypeForIndex() - replaced with SDL_GetGamepadTypeForID() The following symbols have been renamed: * SDL_CONTROLLER_AXIS_INVALID => SDL_GAMEPAD_AXIS_INVALID @@ -700,7 +700,7 @@ Rather than iterating over haptic devices using device index, there is a new fun if (haptics) { for (i = 0; i < num_haptics; ++i) { SDL_HapticID instance_id = haptics[i]; - const char *name = SDL_GetHapticNameFromID(instance_id); + const char *name = SDL_GetHapticNameForID(instance_id); SDL_Log("Haptic %" SDL_PRIu32 ": %s\n", instance_id, name ? name : "Unknown"); @@ -742,7 +742,7 @@ The following functions have been renamed: The following functions have been removed: * SDL_HapticIndex() - replaced with SDL_GetHapticID() -* SDL_HapticName() - replaced with SDL_GetHapticNameFromID() +* SDL_HapticName() - replaced with SDL_GetHapticNameForID() * SDL_HapticOpened() - replaced with SDL_GetHapticFromID() * SDL_NumHaptics() - replaced with SDL_GetHaptics() @@ -830,11 +830,11 @@ Rather than iterating over joysticks using device index, there is a new function if (joysticks) { for (i = 0; i < num_joysticks; ++i) { SDL_JoystickID instance_id = joysticks[i]; - const char *name = SDL_GetJoystickNameFromID(instance_id); - const char *path = SDL_GetJoystickPathFromID(instance_id); + const char *name = SDL_GetJoystickNameForID(instance_id); + const char *path = SDL_GetJoystickPathForID(instance_id); SDL_Log("Joystick %" SDL_PRIu32 ": %s%s%s VID 0x%.4x, PID 0x%.4x\n", - instance_id, name ? name : "Unknown", path ? ", " : "", path ? path : "", SDL_GetJoystickVendorFromID(instance_id), SDL_GetJoystickProductFromID(instance_id)); + instance_id, name ? name : "Unknown", path ? ", " : "", path ? path : "", SDL_GetJoystickVendorForID(instance_id), SDL_GetJoystickProductForID(instance_id)); } SDL_free(joysticks); } @@ -845,7 +845,7 @@ Rather than iterating over joysticks using device index, there is a new function The SDL_EVENT_JOYSTICK_ADDED event now provides the joystick instance ID in the `which` member of the jdevice event structure. -The functions SDL_GetJoysticks(), SDL_GetJoystickNameFromID(), SDL_GetJoystickPathFromID(), SDL_GetJoystickPlayerIndexFromID(), SDL_GetJoystickGUIDFromID(), SDL_GetJoystickVendorFromID(), SDL_GetJoystickProductFromID(), SDL_GetJoystickProductVersionFromID(), and SDL_GetJoystickTypeFromID() have been added to directly query the list of available joysticks. +The functions SDL_GetJoysticks(), SDL_GetJoystickNameForID(), SDL_GetJoystickPathForID(), SDL_GetJoystickPlayerIndexForID(), SDL_GetJoystickGUIDForID(), SDL_GetJoystickVendorForID(), SDL_GetJoystickProductForID(), SDL_GetJoystickProductVersionForID(), and SDL_GetJoystickTypeForID() have been added to directly query the list of available joysticks. SDL_AttachVirtualJoystick() now returns the joystick instance ID instead of a device index, and returns 0 if there was an error. @@ -899,18 +899,18 @@ The following functions have been removed: * SDL_JoystickAttachVirtual() - replaced with SDL_AttachVirtualJoystick() * SDL_JoystickCurrentPowerLevel() - replaced with SDL_GetJoystickConnectionState() and SDL_GetJoystickPowerInfo() * SDL_JoystickEventState() - replaced with SDL_SetJoystickEventsEnabled() and SDL_JoystickEventsEnabled() -* SDL_JoystickGetDeviceGUID() - replaced with SDL_GetJoystickGUIDFromID() +* SDL_JoystickGetDeviceGUID() - replaced with SDL_GetJoystickGUIDForID() * SDL_JoystickGetDeviceInstanceID() -* SDL_JoystickGetDevicePlayerIndex() - replaced with SDL_GetJoystickPlayerIndexFromID() -* SDL_JoystickGetDeviceProduct() - replaced with SDL_GetJoystickProductFromID() -* SDL_JoystickGetDeviceProductVersion() - replaced with SDL_GetJoystickProductVersionFromID() -* SDL_JoystickGetDeviceType() - replaced with SDL_GetJoystickTypeFromID() -* SDL_JoystickGetDeviceVendor() - replaced with SDL_GetJoystickVendorFromID() +* SDL_JoystickGetDevicePlayerIndex() - replaced with SDL_GetJoystickPlayerIndexForID() +* SDL_JoystickGetDeviceProduct() - replaced with SDL_GetJoystickProductForID() +* SDL_JoystickGetDeviceProductVersion() - replaced with SDL_GetJoystickProductVersionForID() +* SDL_JoystickGetDeviceType() - replaced with SDL_GetJoystickTypeForID() +* SDL_JoystickGetDeviceVendor() - replaced with SDL_GetJoystickVendorForID() * SDL_JoystickHasLED() - replaced with SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN * SDL_JoystickHasRumble() - replaced with SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN * SDL_JoystickHasRumbleTriggers() - replaced with SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN -* SDL_JoystickNameForIndex() - replaced with SDL_GetJoystickNameFromID() -* SDL_JoystickPathForIndex() - replaced with SDL_GetJoystickPathFromID() +* SDL_JoystickNameForIndex() - replaced with SDL_GetJoystickNameForID() +* SDL_JoystickPathForIndex() - replaced with SDL_GetJoystickPathForID() * SDL_NumJoysticks() - replaced with SDL_GetJoysticks() * SDL_VIRTUAL_JOYSTICK_DESC_VERSION - no longer needed, version info has been removed from SDL_VirtualJoystickDesc. @@ -1571,9 +1571,9 @@ Rather than iterating over sensors using device index, there is a new function S for (i = 0; i < num_sensors; ++i) { SDL_Log("Sensor %" SDL_PRIu32 ": %s, type %d, platform type %d\n", sensors[i], - SDL_GetSensorNameFromID(sensors[i]), - SDL_GetSensorTypeFromID(sensors[i]), - SDL_GetSensorNonPortableTypeFromID(sensors[i])); + SDL_GetSensorNameForID(sensors[i]), + SDL_GetSensorTypeForID(sensors[i]), + SDL_GetSensorNonPortableTypeForID(sensors[i])); } SDL_free(sensors); } @@ -1600,9 +1600,9 @@ The following functions have been removed: * SDL_LockSensors() * SDL_NumSensors() - replaced with SDL_GetSensors() * SDL_SensorGetDeviceInstanceID() -* SDL_SensorGetDeviceName() - replaced with SDL_GetSensorNameFromID() -* SDL_SensorGetDeviceNonPortableType() - replaced with SDL_GetSensorNonPortableTypeFromID() -* SDL_SensorGetDeviceType() - replaced with SDL_GetSensorTypeFromID() +* SDL_SensorGetDeviceName() - replaced with SDL_GetSensorNameForID() +* SDL_SensorGetDeviceNonPortableType() - replaced with SDL_GetSensorNonPortableTypeForID() +* SDL_SensorGetDeviceType() - replaced with SDL_GetSensorTypeForID() * SDL_UnlockSensors() ## SDL_shape.h diff --git a/include/SDL3/SDL_gamepad.h b/include/SDL3/SDL_gamepad.h index 08f4af52fb5d2..dea57ca279349 100644 --- a/include/SDL3/SDL_gamepad.h +++ b/include/SDL3/SDL_gamepad.h @@ -412,7 +412,7 @@ extern SDL_DECLSPEC char ** SDLCALL SDL_GetGamepadMappings(int *count); * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetJoystickGUIDFromID + * \sa SDL_GetJoystickGUIDForID * \sa SDL_GetJoystickGUID */ extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_JoystickGUID guid); @@ -431,7 +431,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_JoystickGUID * \since This function is available since SDL 3.0.0. * * \sa SDL_AddGamepadMapping - * \sa SDL_GetGamepadMappingFromID + * \sa SDL_GetGamepadMappingForID * \sa SDL_GetGamepadMappingForGUID * \sa SDL_SetGamepadMapping */ @@ -511,7 +511,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_IsGamepad(SDL_JoystickID instance_id); * \sa SDL_GetGamepadName * \sa SDL_GetGamepads */ -extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadNameFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadNameForID(SDL_JoystickID instance_id); /** * Get the implementation dependent path of a gamepad. @@ -529,7 +529,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadNameFromID(SDL_JoystickID * \sa SDL_GetGamepadPath * \sa SDL_GetGamepads */ -extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadPathFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadPathForID(SDL_JoystickID instance_id); /** * Get the player index of a gamepad. @@ -544,7 +544,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadPathFromID(SDL_JoystickID * \sa SDL_GetGamepadPlayerIndex * \sa SDL_GetGamepads */ -extern SDL_DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndexFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndexForID(SDL_JoystickID instance_id); /** * Get the implementation-dependent GUID of a gamepad. @@ -561,7 +561,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndexFromID(SDL_JoystickID i * \sa SDL_GetGamepadGUIDString * \sa SDL_GetGamepads */ -extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetGamepadGUIDFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetGamepadGUIDForID(SDL_JoystickID instance_id); /** * Get the USB vendor ID of a gamepad, if available. @@ -578,7 +578,7 @@ extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetGamepadGUIDFromID(SDL_Joysti * \sa SDL_GetGamepadVendor * \sa SDL_GetGamepads */ -extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendorFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendorForID(SDL_JoystickID instance_id); /** * Get the USB product ID of a gamepad, if available. @@ -595,7 +595,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendorFromID(SDL_JoystickID ins * \sa SDL_GetGamepadProduct * \sa SDL_GetGamepads */ -extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductForID(SDL_JoystickID instance_id); /** * Get the product version of a gamepad, if available. @@ -612,7 +612,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductFromID(SDL_JoystickID in * \sa SDL_GetGamepadProductVersion * \sa SDL_GetGamepads */ -extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersionFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersionForID(SDL_JoystickID instance_id); /** * Get the type of a gamepad. @@ -626,9 +626,9 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersionFromID(SDL_Joysti * * \sa SDL_GetGamepadType * \sa SDL_GetGamepads - * \sa SDL_GetRealGamepadTypeFromID + * \sa SDL_GetRealGamepadTypeForID */ -extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeForID(SDL_JoystickID instance_id); /** * Get the type of a gamepad, ignoring any mapping override. @@ -640,11 +640,11 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeFromID(SDL_Joystic * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetGamepadTypeFromID + * \sa SDL_GetGamepadTypeForID * \sa SDL_GetGamepads * \sa SDL_GetRealGamepadType */ -extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeForID(SDL_JoystickID instance_id); /** * Get the mapping of a gamepad. @@ -660,7 +660,7 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeFromID(SDL_Joy * \sa SDL_GetGamepads * \sa SDL_GetGamepadMapping */ -extern SDL_DECLSPEC char *SDLCALL SDL_GetGamepadMappingFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC char *SDLCALL SDL_GetGamepadMappingForID(SDL_JoystickID instance_id); /** * Open a gamepad for use. @@ -758,7 +758,7 @@ extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_GetGamepadID(SDL_Gamepad *gamepad * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetGamepadNameFromID + * \sa SDL_GetGamepadNameForID */ extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadName(SDL_Gamepad *gamepad); @@ -774,7 +774,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadName(SDL_Gamepad *gamepad) * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetGamepadPathFromID + * \sa SDL_GetGamepadPathForID */ extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadPath(SDL_Gamepad *gamepad); @@ -787,7 +787,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadPath(SDL_Gamepad *gamepad) * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetGamepadTypeFromID + * \sa SDL_GetGamepadTypeForID */ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadType(SDL_Gamepad *gamepad); @@ -800,7 +800,7 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadType(SDL_Gamepad *game * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetRealGamepadTypeFromID + * \sa SDL_GetRealGamepadTypeForID */ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadType(SDL_Gamepad *gamepad); @@ -843,7 +843,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetGamepadPlayerIndex(SDL_Gamepad *gamepad, * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetGamepadVendorFromID + * \sa SDL_GetGamepadVendorForID */ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendor(SDL_Gamepad *gamepad); @@ -857,7 +857,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendor(SDL_Gamepad *gamepad); * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetGamepadProductFromID + * \sa SDL_GetGamepadProductForID */ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProduct(SDL_Gamepad *gamepad); @@ -871,7 +871,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProduct(SDL_Gamepad *gamepad); * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetGamepadProductVersionFromID + * \sa SDL_GetGamepadProductVersionForID */ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersion(SDL_Gamepad *gamepad); diff --git a/include/SDL3/SDL_haptic.h b/include/SDL3/SDL_haptic.h index ecdf5c623f07b..aa858d3222be0 100644 --- a/include/SDL3/SDL_haptic.h +++ b/include/SDL3/SDL_haptic.h @@ -961,7 +961,7 @@ extern SDL_DECLSPEC SDL_HapticID *SDLCALL SDL_GetHaptics(int *count); * \sa SDL_GetHapticName * \sa SDL_OpenHaptic */ -extern SDL_DECLSPEC const char *SDLCALL SDL_GetHapticNameFromID(SDL_HapticID instance_id); +extern SDL_DECLSPEC const char *SDLCALL SDL_GetHapticNameForID(SDL_HapticID instance_id); /** * Open a haptic device for use. @@ -1023,7 +1023,7 @@ extern SDL_DECLSPEC SDL_HapticID SDLCALL SDL_GetHapticID(SDL_Haptic *haptic); * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetHapticNameFromID + * \sa SDL_GetHapticNameForID */ extern SDL_DECLSPEC const char *SDLCALL SDL_GetHapticName(SDL_Haptic *haptic); diff --git a/include/SDL3/SDL_joystick.h b/include/SDL3/SDL_joystick.h index 3c22ab2f8e83d..b9d044f3a9492 100644 --- a/include/SDL3/SDL_joystick.h +++ b/include/SDL3/SDL_joystick.h @@ -112,7 +112,7 @@ typedef Uint32 SDL_JoystickID; * * In some cases, SDL can identify a low-level joystick as being a certain * type of device, and will report it through SDL_GetJoystickType (or - * SDL_GetJoystickTypeFromID). + * SDL_GetJoystickTypeForID). * * This is by no means a complete list of everything that can be plugged into * a computer. @@ -238,7 +238,7 @@ extern SDL_DECLSPEC SDL_JoystickID *SDLCALL SDL_GetJoysticks(int *count); * \sa SDL_GetJoystickName * \sa SDL_GetJoysticks */ -extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickNameFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickNameForID(SDL_JoystickID instance_id); /** * Get the implementation dependent path of a joystick. @@ -256,7 +256,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickNameFromID(SDL_JoystickID * \sa SDL_GetJoystickPath * \sa SDL_GetJoysticks */ -extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickPathFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickPathForID(SDL_JoystickID instance_id); /** * Get the player index of a joystick. @@ -271,7 +271,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickPathFromID(SDL_JoystickID * \sa SDL_GetJoystickPlayerIndex * \sa SDL_GetJoysticks */ -extern SDL_DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndexFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id); /** * Get the implementation-dependent GUID of a joystick. @@ -287,7 +287,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndexFromID(SDL_JoystickID * \sa SDL_GetJoystickGUID * \sa SDL_GetJoystickGUIDString */ -extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUIDFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUIDForID(SDL_JoystickID instance_id); /** * Get the USB vendor ID of a joystick, if available. @@ -304,7 +304,7 @@ extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUIDFromID(SDL_Joyst * \sa SDL_GetJoystickVendor * \sa SDL_GetJoysticks */ -extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendorFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendorForID(SDL_JoystickID instance_id); /** * Get the USB product ID of a joystick, if available. @@ -321,7 +321,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendorFromID(SDL_JoystickID in * \sa SDL_GetJoystickProduct * \sa SDL_GetJoysticks */ -extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductForID(SDL_JoystickID instance_id); /** * Get the product version of a joystick, if available. @@ -338,7 +338,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductFromID(SDL_JoystickID i * \sa SDL_GetJoystickProductVersion * \sa SDL_GetJoysticks */ -extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersionFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersionForID(SDL_JoystickID instance_id); /** * Get the type of a joystick, if available. @@ -355,7 +355,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersionFromID(SDL_Joyst * \sa SDL_GetJoystickType * \sa SDL_GetJoysticks */ -extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickTypeFromID(SDL_JoystickID instance_id); +extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickTypeForID(SDL_JoystickID instance_id); /** * Open a joystick for use. @@ -674,7 +674,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetJoystickProperties(SDL_Joyst * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetJoystickNameFromID + * \sa SDL_GetJoystickNameForID */ extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickName(SDL_Joystick *joystick); @@ -689,7 +689,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickName(SDL_Joystick *joysti * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetJoystickPathFromID + * \sa SDL_GetJoystickPathForID */ extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickPath(SDL_Joystick *joystick); @@ -735,7 +735,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetJoystickPlayerIndex(SDL_Joystick *joystic * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetJoystickGUIDFromID + * \sa SDL_GetJoystickGUIDForID * \sa SDL_GetJoystickGUIDString */ extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUID(SDL_Joystick *joystick); @@ -750,7 +750,7 @@ extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUID(SDL_Joystick *j * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetJoystickVendorFromID + * \sa SDL_GetJoystickVendorForID */ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendor(SDL_Joystick *joystick); @@ -764,7 +764,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendor(SDL_Joystick *joystick) * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetJoystickProductFromID + * \sa SDL_GetJoystickProductForID */ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProduct(SDL_Joystick *joystick); @@ -778,7 +778,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProduct(SDL_Joystick *joystick * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetJoystickProductVersionFromID + * \sa SDL_GetJoystickProductVersionForID */ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersion(SDL_Joystick *joystick); @@ -818,7 +818,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickSerial(SDL_Joystick *joy * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetJoystickTypeFromID + * \sa SDL_GetJoystickTypeForID */ extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickType(SDL_Joystick *joystick); @@ -835,7 +835,7 @@ extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickType(SDL_Joystick *j * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetJoystickGUIDFromID + * \sa SDL_GetJoystickGUIDForID * \sa SDL_GetJoystickGUID * \sa SDL_GetJoystickGUIDFromString */ @@ -872,7 +872,7 @@ extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUIDFromString(const * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetJoystickGUIDFromID + * \sa SDL_GetJoystickGUIDForID */ extern SDL_DECLSPEC void SDLCALL SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16); diff --git a/include/SDL3/SDL_keyboard.h b/include/SDL3/SDL_keyboard.h index 1bdfa1a621a3e..9a5dd5decb871 100644 --- a/include/SDL3/SDL_keyboard.h +++ b/include/SDL3/SDL_keyboard.h @@ -80,7 +80,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasKeyboard(void); * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetKeyboardNameFromID + * \sa SDL_GetKeyboardNameForID * \sa SDL_HasKeyboard */ extern SDL_DECLSPEC SDL_KeyboardID *SDLCALL SDL_GetKeyboards(int *count); @@ -100,7 +100,7 @@ extern SDL_DECLSPEC SDL_KeyboardID *SDLCALL SDL_GetKeyboards(int *count); * * \sa SDL_GetKeyboards */ -extern SDL_DECLSPEC const char *SDLCALL SDL_GetKeyboardNameFromID(SDL_KeyboardID instance_id); +extern SDL_DECLSPEC const char *SDLCALL SDL_GetKeyboardNameForID(SDL_KeyboardID instance_id); /** * Query the window which currently has keyboard focus. diff --git a/include/SDL3/SDL_mouse.h b/include/SDL3/SDL_mouse.h index 074cdfcb7176c..a3f8f34d53f93 100644 --- a/include/SDL3/SDL_mouse.h +++ b/include/SDL3/SDL_mouse.h @@ -142,7 +142,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasMouse(void); * * \since This function is available since SDL 3.0.0. * - * \sa SDL_GetMouseNameFromID + * \sa SDL_GetMouseNameForID * \sa SDL_HasMouse */ extern SDL_DECLSPEC SDL_MouseID *SDLCALL SDL_GetMice(int *count); @@ -162,7 +162,7 @@ extern SDL_DECLSPEC SDL_MouseID *SDLCALL SDL_GetMice(int *count); * * \sa SDL_GetMice */ -extern SDL_DECLSPEC const char *SDLCALL SDL_GetMouseNameFromID(SDL_MouseID instance_id); +extern SDL_DECLSPEC const char *SDLCALL SDL_GetMouseNameForID(SDL_MouseID instance_id); /** * Get the window which currently has mouse focus. diff --git a/include/SDL3/SDL_sensor.h b/include/SDL3/SDL_sensor.h index 26097a586dcad..f404b03529d02 100644 --- a/include/SDL3/SDL_sensor.h +++ b/include/SDL3/SDL_sensor.h @@ -167,7 +167,7 @@ extern SDL_DECLSPEC SDL_SensorID *SDLCALL SDL_GetSensors(int *count); * * \since This function is available since SDL 3.0.0. */ -extern SDL_DECLSPEC const char *SDLCALL SDL_GetSensorNameFromID(SDL_SensorID instance_id); +extern SDL_DECLSPEC const char *SDLCALL SDL_GetSensorNameForID(SDL_SensorID instance_id); /** * Get the type of a sensor. @@ -180,7 +180,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetSensorNameFromID(SDL_SensorID ins * * \since This function is available since SDL 3.0.0. */ -extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorTypeFromID(SDL_SensorID instance_id); +extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorTypeForID(SDL_SensorID instance_id); /** * Get the platform dependent type of a sensor. @@ -193,7 +193,7 @@ extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorTypeFromID(SDL_SensorID * * \since This function is available since SDL 3.0.0. */ -extern SDL_DECLSPEC int SDLCALL SDL_GetSensorNonPortableTypeFromID(SDL_SensorID instance_id); +extern SDL_DECLSPEC int SDLCALL SDL_GetSensorNonPortableTypeForID(SDL_SensorID instance_id); /** * Open a sensor for use. diff --git a/src/dynapi/SDL_dynapi.sym b/src/dynapi/SDL_dynapi.sym index fa463caf03ec5..790f08e93959e 100644 --- a/src/dynapi/SDL_dynapi.sym +++ b/src/dynapi/SDL_dynapi.sym @@ -242,24 +242,24 @@ SDL3_0.0.0 { SDL_GetGamepadFirmwareVersion; SDL_GetGamepadFromID; SDL_GetGamepadFromPlayerIndex; - SDL_GetGamepadGUIDFromID; + SDL_GetGamepadGUIDForID; SDL_GetGamepadID; SDL_GetGamepadJoystick; SDL_GetGamepadMapping; SDL_GetGamepadMappingForGUID; - SDL_GetGamepadMappingFromID; + SDL_GetGamepadMappingForID; SDL_GetGamepadMappings; SDL_GetGamepadName; - SDL_GetGamepadNameFromID; + SDL_GetGamepadNameForID; SDL_GetGamepadPath; - SDL_GetGamepadPathFromID; + SDL_GetGamepadPathForID; SDL_GetGamepadPlayerIndex; - SDL_GetGamepadPlayerIndexFromID; + SDL_GetGamepadPlayerIndexForID; SDL_GetGamepadPowerInfo; SDL_GetGamepadProduct; - SDL_GetGamepadProductFromID; + SDL_GetGamepadProductForID; SDL_GetGamepadProductVersion; - SDL_GetGamepadProductVersionFromID; + SDL_GetGamepadProductVersionForID; SDL_GetGamepadProperties; SDL_GetGamepadSensorData; SDL_GetGamepadSensorDataRate; @@ -270,10 +270,10 @@ SDL3_0.0.0 { SDL_GetGamepadStringForType; SDL_GetGamepadTouchpadFinger; SDL_GetGamepadType; - SDL_GetGamepadTypeFromID; + SDL_GetGamepadTypeForID; SDL_GetGamepadTypeFromString; SDL_GetGamepadVendor; - SDL_GetGamepadVendorFromID; + SDL_GetGamepadVendorForID; SDL_GetGamepads; SDL_GetGlobalMouseState; SDL_GetGlobalProperties; @@ -283,7 +283,7 @@ SDL3_0.0.0 { SDL_GetHapticFromID; SDL_GetHapticID; SDL_GetHapticName; - SDL_GetHapticNameFromID; + SDL_GetHapticNameForID; SDL_GetHaptics; SDL_GetHint; SDL_GetHintBoolean; @@ -299,35 +299,35 @@ SDL3_0.0.0 { SDL_GetJoystickFromID; SDL_GetJoystickFromPlayerIndex; SDL_GetJoystickGUID; - SDL_GetJoystickGUIDFromID; + SDL_GetJoystickGUIDForID; SDL_GetJoystickGUIDFromString; SDL_GetJoystickGUIDInfo; SDL_GetJoystickGUIDString; SDL_GetJoystickHat; SDL_GetJoystickID; SDL_GetJoystickName; - SDL_GetJoystickNameFromID; + SDL_GetJoystickNameForID; SDL_GetJoystickPath; - SDL_GetJoystickPathFromID; + SDL_GetJoystickPathForID; SDL_GetJoystickPlayerIndex; - SDL_GetJoystickPlayerIndexFromID; + SDL_GetJoystickPlayerIndexForID; SDL_GetJoystickPowerInfo; SDL_GetJoystickProduct; - SDL_GetJoystickProductFromID; + SDL_GetJoystickProductForID; SDL_GetJoystickProductVersion; - SDL_GetJoystickProductVersionFromID; + SDL_GetJoystickProductVersionForID; SDL_GetJoystickProperties; SDL_GetJoystickSerial; SDL_GetJoystickType; - SDL_GetJoystickTypeFromID; + SDL_GetJoystickTypeForID; SDL_GetJoystickVendor; - SDL_GetJoystickVendorFromID; + SDL_GetJoystickVendorForID; SDL_GetJoysticks; SDL_GetKeyFromName; SDL_GetKeyFromScancode; SDL_GetKeyName; SDL_GetKeyboardFocus; - SDL_GetKeyboardNameFromID; + SDL_GetKeyboardNameForID; SDL_GetKeyboardState; SDL_GetKeyboards; SDL_GetLogOutputFunction; @@ -339,7 +339,7 @@ SDL3_0.0.0 { SDL_GetMice; SDL_GetModState; SDL_GetMouseFocus; - SDL_GetMouseNameFromID; + SDL_GetMouseNameForID; SDL_GetMouseState; SDL_GetNaturalDisplayOrientation; SDL_GetNumAllocations; @@ -380,7 +380,7 @@ SDL3_0.0.0 { SDL_GetRGB; SDL_GetRGBA; SDL_GetRealGamepadType; - SDL_GetRealGamepadTypeFromID; + SDL_GetRealGamepadTypeForID; SDL_GetRectAndLineIntersection; SDL_GetRectAndLineIntersectionFloat; SDL_GetRectEnclosingPoints; @@ -421,12 +421,12 @@ SDL3_0.0.0 { SDL_GetSensorFromID; SDL_GetSensorID; SDL_GetSensorName; - SDL_GetSensorNameFromID; + SDL_GetSensorNameForID; SDL_GetSensorNonPortableType; - SDL_GetSensorNonPortableTypeFromID; + SDL_GetSensorNonPortableTypeForID; SDL_GetSensorProperties; SDL_GetSensorType; - SDL_GetSensorTypeFromID; + SDL_GetSensorTypeForID; SDL_GetSensors; SDL_GetSilenceValueForFormat; SDL_GetStorageFileSize; diff --git a/src/dynapi/SDL_dynapi_overrides.h b/src/dynapi/SDL_dynapi_overrides.h index 5899c87846045..eaf1860602295 100644 --- a/src/dynapi/SDL_dynapi_overrides.h +++ b/src/dynapi/SDL_dynapi_overrides.h @@ -267,24 +267,24 @@ #define SDL_GetGamepadFirmwareVersion SDL_GetGamepadFirmwareVersion_REAL #define SDL_GetGamepadFromID SDL_GetGamepadFromID_REAL #define SDL_GetGamepadFromPlayerIndex SDL_GetGamepadFromPlayerIndex_REAL -#define SDL_GetGamepadGUIDFromID SDL_GetGamepadGUIDFromID_REAL +#define SDL_GetGamepadGUIDForID SDL_GetGamepadGUIDForID_REAL #define SDL_GetGamepadID SDL_GetGamepadID_REAL #define SDL_GetGamepadJoystick SDL_GetGamepadJoystick_REAL #define SDL_GetGamepadMapping SDL_GetGamepadMapping_REAL #define SDL_GetGamepadMappingForGUID SDL_GetGamepadMappingForGUID_REAL -#define SDL_GetGamepadMappingFromID SDL_GetGamepadMappingFromID_REAL +#define SDL_GetGamepadMappingForID SDL_GetGamepadMappingForID_REAL #define SDL_GetGamepadMappings SDL_GetGamepadMappings_REAL #define SDL_GetGamepadName SDL_GetGamepadName_REAL -#define SDL_GetGamepadNameFromID SDL_GetGamepadNameFromID_REAL +#define SDL_GetGamepadNameForID SDL_GetGamepadNameForID_REAL #define SDL_GetGamepadPath SDL_GetGamepadPath_REAL -#define SDL_GetGamepadPathFromID SDL_GetGamepadPathFromID_REAL +#define SDL_GetGamepadPathForID SDL_GetGamepadPathForID_REAL #define SDL_GetGamepadPlayerIndex SDL_GetGamepadPlayerIndex_REAL -#define SDL_GetGamepadPlayerIndexFromID SDL_GetGamepadPlayerIndexFromID_REAL +#define SDL_GetGamepadPlayerIndexForID SDL_GetGamepadPlayerIndexForID_REAL #define SDL_GetGamepadPowerInfo SDL_GetGamepadPowerInfo_REAL #define SDL_GetGamepadProduct SDL_GetGamepadProduct_REAL -#define SDL_GetGamepadProductFromID SDL_GetGamepadProductFromID_REAL +#define SDL_GetGamepadProductForID SDL_GetGamepadProductForID_REAL #define SDL_GetGamepadProductVersion SDL_GetGamepadProductVersion_REAL -#define SDL_GetGamepadProductVersionFromID SDL_GetGamepadProductVersionFromID_REAL +#define SDL_GetGamepadProductVersionForID SDL_GetGamepadProductVersionForID_REAL #define SDL_GetGamepadProperties SDL_GetGamepadProperties_REAL #define SDL_GetGamepadSensorData SDL_GetGamepadSensorData_REAL #define SDL_GetGamepadSensorDataRate SDL_GetGamepadSensorDataRate_REAL @@ -295,10 +295,10 @@ #define SDL_GetGamepadStringForType SDL_GetGamepadStringForType_REAL #define SDL_GetGamepadTouchpadFinger SDL_GetGamepadTouchpadFinger_REAL #define SDL_GetGamepadType SDL_GetGamepadType_REAL -#define SDL_GetGamepadTypeFromID SDL_GetGamepadTypeFromID_REAL +#define SDL_GetGamepadTypeForID SDL_GetGamepadTypeForID_REAL #define SDL_GetGamepadTypeFromString SDL_GetGamepadTypeFromString_REAL #define SDL_GetGamepadVendor SDL_GetGamepadVendor_REAL -#define SDL_GetGamepadVendorFromID SDL_GetGamepadVendorFromID_REAL +#define SDL_GetGamepadVendorForID SDL_GetGamepadVendorForID_REAL #define SDL_GetGamepads SDL_GetGamepads_REAL #define SDL_GetGlobalMouseState SDL_GetGlobalMouseState_REAL #define SDL_GetGlobalProperties SDL_GetGlobalProperties_REAL @@ -308,7 +308,7 @@ #define SDL_GetHapticFromID SDL_GetHapticFromID_REAL #define SDL_GetHapticID SDL_GetHapticID_REAL #define SDL_GetHapticName SDL_GetHapticName_REAL -#define SDL_GetHapticNameFromID SDL_GetHapticNameFromID_REAL +#define SDL_GetHapticNameForID SDL_GetHapticNameForID_REAL #define SDL_GetHaptics SDL_GetHaptics_REAL #define SDL_GetHint SDL_GetHint_REAL #define SDL_GetHintBoolean SDL_GetHintBoolean_REAL @@ -324,35 +324,35 @@ #define SDL_GetJoystickFromID SDL_GetJoystickFromID_REAL #define SDL_GetJoystickFromPlayerIndex SDL_GetJoystickFromPlayerIndex_REAL #define SDL_GetJoystickGUID SDL_GetJoystickGUID_REAL -#define SDL_GetJoystickGUIDFromID SDL_GetJoystickGUIDFromID_REAL +#define SDL_GetJoystickGUIDForID SDL_GetJoystickGUIDForID_REAL #define SDL_GetJoystickGUIDFromString SDL_GetJoystickGUIDFromString_REAL #define SDL_GetJoystickGUIDInfo SDL_GetJoystickGUIDInfo_REAL #define SDL_GetJoystickGUIDString SDL_GetJoystickGUIDString_REAL #define SDL_GetJoystickHat SDL_GetJoystickHat_REAL #define SDL_GetJoystickID SDL_GetJoystickID_REAL #define SDL_GetJoystickName SDL_GetJoystickName_REAL -#define SDL_GetJoystickNameFromID SDL_GetJoystickNameFromID_REAL +#define SDL_GetJoystickNameForID SDL_GetJoystickNameForID_REAL #define SDL_GetJoystickPath SDL_GetJoystickPath_REAL -#define SDL_GetJoystickPathFromID SDL_GetJoystickPathFromID_REAL +#define SDL_GetJoystickPathForID SDL_GetJoystickPathForID_REAL #define SDL_GetJoystickPlayerIndex SDL_GetJoystickPlayerIndex_REAL -#define SDL_GetJoystickPlayerIndexFromID SDL_GetJoystickPlayerIndexFromID_REAL +#define SDL_GetJoystickPlayerIndexForID SDL_GetJoystickPlayerIndexForID_REAL #define SDL_GetJoystickPowerInfo SDL_GetJoystickPowerInfo_REAL #define SDL_GetJoystickProduct SDL_GetJoystickProduct_REAL -#define SDL_GetJoystickProductFromID SDL_GetJoystickProductFromID_REAL +#define SDL_GetJoystickProductForID SDL_GetJoystickProductForID_REAL #define SDL_GetJoystickProductVersion SDL_GetJoystickProductVersion_REAL -#define SDL_GetJoystickProductVersionFromID SDL_GetJoystickProductVersionFromID_REAL +#define SDL_GetJoystickProductVersionForID SDL_GetJoystickProductVersionForID_REAL #define SDL_GetJoystickProperties SDL_GetJoystickProperties_REAL #define SDL_GetJoystickSerial SDL_GetJoystickSerial_REAL #define SDL_GetJoystickType SDL_GetJoystickType_REAL -#define SDL_GetJoystickTypeFromID SDL_GetJoystickTypeFromID_REAL +#define SDL_GetJoystickTypeForID SDL_GetJoystickTypeForID_REAL #define SDL_GetJoystickVendor SDL_GetJoystickVendor_REAL -#define SDL_GetJoystickVendorFromID SDL_GetJoystickVendorFromID_REAL +#define SDL_GetJoystickVendorForID SDL_GetJoystickVendorForID_REAL #define SDL_GetJoysticks SDL_GetJoysticks_REAL #define SDL_GetKeyFromName SDL_GetKeyFromName_REAL #define SDL_GetKeyFromScancode SDL_GetKeyFromScancode_REAL #define SDL_GetKeyName SDL_GetKeyName_REAL #define SDL_GetKeyboardFocus SDL_GetKeyboardFocus_REAL -#define SDL_GetKeyboardNameFromID SDL_GetKeyboardNameFromID_REAL +#define SDL_GetKeyboardNameForID SDL_GetKeyboardNameForID_REAL #define SDL_GetKeyboardState SDL_GetKeyboardState_REAL #define SDL_GetKeyboards SDL_GetKeyboards_REAL #define SDL_GetLogOutputFunction SDL_GetLogOutputFunction_REAL @@ -364,7 +364,7 @@ #define SDL_GetMice SDL_GetMice_REAL #define SDL_GetModState SDL_GetModState_REAL #define SDL_GetMouseFocus SDL_GetMouseFocus_REAL -#define SDL_GetMouseNameFromID SDL_GetMouseNameFromID_REAL +#define SDL_GetMouseNameForID SDL_GetMouseNameForID_REAL #define SDL_GetMouseState SDL_GetMouseState_REAL #define SDL_GetNaturalDisplayOrientation SDL_GetNaturalDisplayOrientation_REAL #define SDL_GetNumAllocations SDL_GetNumAllocations_REAL @@ -405,7 +405,7 @@ #define SDL_GetRGB SDL_GetRGB_REAL #define SDL_GetRGBA SDL_GetRGBA_REAL #define SDL_GetRealGamepadType SDL_GetRealGamepadType_REAL -#define SDL_GetRealGamepadTypeFromID SDL_GetRealGamepadTypeFromID_REAL +#define SDL_GetRealGamepadTypeForID SDL_GetRealGamepadTypeForID_REAL #define SDL_GetRectAndLineIntersection SDL_GetRectAndLineIntersection_REAL #define SDL_GetRectAndLineIntersectionFloat SDL_GetRectAndLineIntersectionFloat_REAL #define SDL_GetRectEnclosingPoints SDL_GetRectEnclosingPoints_REAL @@ -446,12 +446,12 @@ #define SDL_GetSensorFromID SDL_GetSensorFromID_REAL #define SDL_GetSensorID SDL_GetSensorID_REAL #define SDL_GetSensorName SDL_GetSensorName_REAL -#define SDL_GetSensorNameFromID SDL_GetSensorNameFromID_REAL +#define SDL_GetSensorNameForID SDL_GetSensorNameForID_REAL #define SDL_GetSensorNonPortableType SDL_GetSensorNonPortableType_REAL -#define SDL_GetSensorNonPortableTypeFromID SDL_GetSensorNonPortableTypeFromID_REAL +#define SDL_GetSensorNonPortableTypeForID SDL_GetSensorNonPortableTypeForID_REAL #define SDL_GetSensorProperties SDL_GetSensorProperties_REAL #define SDL_GetSensorType SDL_GetSensorType_REAL -#define SDL_GetSensorTypeFromID SDL_GetSensorTypeFromID_REAL +#define SDL_GetSensorTypeForID SDL_GetSensorTypeForID_REAL #define SDL_GetSensors SDL_GetSensors_REAL #define SDL_GetSilenceValueForFormat SDL_GetSilenceValueForFormat_REAL #define SDL_GetStorageFileSize SDL_GetStorageFileSize_REAL diff --git a/src/dynapi/SDL_dynapi_procs.h b/src/dynapi/SDL_dynapi_procs.h index 705b95747b7eb..dc05b870f79e7 100644 --- a/src/dynapi/SDL_dynapi_procs.h +++ b/src/dynapi/SDL_dynapi_procs.h @@ -287,24 +287,24 @@ SDL_DYNAPI_PROC(SDL_JoystickConnectionState,SDL_GetGamepadConnectionState,(SDL_G SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadFirmwareVersion,(SDL_Gamepad *a),(a),return) SDL_DYNAPI_PROC(SDL_Gamepad*,SDL_GetGamepadFromID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_Gamepad*,SDL_GetGamepadFromPlayerIndex,(int a),(a),return) -SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_GetGamepadGUIDFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_GetGamepadGUIDForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_JoystickID,SDL_GetGamepadID,(SDL_Gamepad *a),(a),return) SDL_DYNAPI_PROC(SDL_Joystick*,SDL_GetGamepadJoystick,(SDL_Gamepad *a),(a),return) SDL_DYNAPI_PROC(char*,SDL_GetGamepadMapping,(SDL_Gamepad *a),(a),return) SDL_DYNAPI_PROC(char*,SDL_GetGamepadMappingForGUID,(SDL_JoystickGUID a),(a),return) -SDL_DYNAPI_PROC(char*,SDL_GetGamepadMappingFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(char*,SDL_GetGamepadMappingForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(char**,SDL_GetGamepadMappings,(int *a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetGamepadName,(SDL_Gamepad *a),(a),return) -SDL_DYNAPI_PROC(const char*,SDL_GetGamepadNameFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GetGamepadNameForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetGamepadPath,(SDL_Gamepad *a),(a),return) -SDL_DYNAPI_PROC(const char*,SDL_GetGamepadPathFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GetGamepadPathForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(int,SDL_GetGamepadPlayerIndex,(SDL_Gamepad *a),(a),return) -SDL_DYNAPI_PROC(int,SDL_GetGamepadPlayerIndexFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GetGamepadPlayerIndexForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_PowerState,SDL_GetGamepadPowerInfo,(SDL_Gamepad *a, int *b),(a,b),return) SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadProduct,(SDL_Gamepad *a),(a),return) -SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadProductFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadProductForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadProductVersion,(SDL_Gamepad *a),(a),return) -SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadProductVersionFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadProductVersionForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_PropertiesID,SDL_GetGamepadProperties,(SDL_Gamepad *a),(a),return) SDL_DYNAPI_PROC(int,SDL_GetGamepadSensorData,(SDL_Gamepad *a, SDL_SensorType b, float *c, int d),(a,b,c,d),return) SDL_DYNAPI_PROC(float,SDL_GetGamepadSensorDataRate,(SDL_Gamepad *a, SDL_SensorType b),(a,b),return) @@ -315,10 +315,10 @@ SDL_DYNAPI_PROC(const char*,SDL_GetGamepadStringForButton,(SDL_GamepadButton a), SDL_DYNAPI_PROC(const char*,SDL_GetGamepadStringForType,(SDL_GamepadType a),(a),return) SDL_DYNAPI_PROC(int,SDL_GetGamepadTouchpadFinger,(SDL_Gamepad *a, int b, int c, Uint8 *d, float *e, float *f, float *g),(a,b,c,d,e,f,g),return) SDL_DYNAPI_PROC(SDL_GamepadType,SDL_GetGamepadType,(SDL_Gamepad *a),(a),return) -SDL_DYNAPI_PROC(SDL_GamepadType,SDL_GetGamepadTypeFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(SDL_GamepadType,SDL_GetGamepadTypeForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_GamepadType,SDL_GetGamepadTypeFromString,(const char *a),(a),return) SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadVendor,(SDL_Gamepad *a),(a),return) -SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadVendorFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadVendorForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_JoystickID*,SDL_GetGamepads,(int *a),(a),return) SDL_DYNAPI_PROC(SDL_MouseButtonFlags,SDL_GetGlobalMouseState,(float *a, float *b),(a,b),return) SDL_DYNAPI_PROC(SDL_PropertiesID,SDL_GetGlobalProperties,(void),(),return) @@ -328,7 +328,7 @@ SDL_DYNAPI_PROC(Uint32,SDL_GetHapticFeatures,(SDL_Haptic *a),(a),return) SDL_DYNAPI_PROC(SDL_Haptic*,SDL_GetHapticFromID,(SDL_HapticID a),(a),return) SDL_DYNAPI_PROC(SDL_HapticID,SDL_GetHapticID,(SDL_Haptic *a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetHapticName,(SDL_Haptic *a),(a),return) -SDL_DYNAPI_PROC(const char*,SDL_GetHapticNameFromID,(SDL_HapticID a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GetHapticNameForID,(SDL_HapticID a),(a),return) SDL_DYNAPI_PROC(SDL_HapticID*,SDL_GetHaptics,(int *a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetHint,(const char *a),(a),return) SDL_DYNAPI_PROC(SDL_bool,SDL_GetHintBoolean,(const char *a, SDL_bool b),(a,b),return) @@ -344,35 +344,35 @@ SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickFirmwareVersion,(SDL_Joystick *a),(a),retu SDL_DYNAPI_PROC(SDL_Joystick*,SDL_GetJoystickFromID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_Joystick*,SDL_GetJoystickFromPlayerIndex,(int a),(a),return) SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_GetJoystickGUID,(SDL_Joystick *a),(a),return) -SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_GetJoystickGUIDFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_GetJoystickGUIDForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_GetJoystickGUIDFromString,(const char *a),(a),return) SDL_DYNAPI_PROC(void,SDL_GetJoystickGUIDInfo,(SDL_JoystickGUID a, Uint16 *b, Uint16 *c, Uint16 *d, Uint16 *e),(a,b,c,d,e),) SDL_DYNAPI_PROC(int,SDL_GetJoystickGUIDString,(SDL_JoystickGUID a, char *b, int c),(a,b,c),return) SDL_DYNAPI_PROC(Uint8,SDL_GetJoystickHat,(SDL_Joystick *a, int b),(a,b),return) SDL_DYNAPI_PROC(SDL_JoystickID,SDL_GetJoystickID,(SDL_Joystick *a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetJoystickName,(SDL_Joystick *a),(a),return) -SDL_DYNAPI_PROC(const char*,SDL_GetJoystickNameFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GetJoystickNameForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetJoystickPath,(SDL_Joystick *a),(a),return) -SDL_DYNAPI_PROC(const char*,SDL_GetJoystickPathFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GetJoystickPathForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(int,SDL_GetJoystickPlayerIndex,(SDL_Joystick *a),(a),return) -SDL_DYNAPI_PROC(int,SDL_GetJoystickPlayerIndexFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GetJoystickPlayerIndexForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_PowerState,SDL_GetJoystickPowerInfo,(SDL_Joystick *a, int *b),(a,b),return) SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickProduct,(SDL_Joystick *a),(a),return) -SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickProductFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickProductForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickProductVersion,(SDL_Joystick *a),(a),return) -SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickProductVersionFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickProductVersionForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_PropertiesID,SDL_GetJoystickProperties,(SDL_Joystick *a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetJoystickSerial,(SDL_Joystick *a),(a),return) SDL_DYNAPI_PROC(SDL_JoystickType,SDL_GetJoystickType,(SDL_Joystick *a),(a),return) -SDL_DYNAPI_PROC(SDL_JoystickType,SDL_GetJoystickTypeFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(SDL_JoystickType,SDL_GetJoystickTypeForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickVendor,(SDL_Joystick *a),(a),return) -SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickVendorFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickVendorForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_JoystickID*,SDL_GetJoysticks,(int *a),(a),return) SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeyFromName,(const char *a),(a),return) SDL_DYNAPI_PROC(SDL_Keycode,SDL_GetKeyFromScancode,(SDL_Scancode a, SDL_Keymod b),(a,b),return) SDL_DYNAPI_PROC(const char*,SDL_GetKeyName,(SDL_Keycode a),(a),return) SDL_DYNAPI_PROC(SDL_Window*,SDL_GetKeyboardFocus,(void),(),return) -SDL_DYNAPI_PROC(const char*,SDL_GetKeyboardNameFromID,(SDL_KeyboardID a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GetKeyboardNameForID,(SDL_KeyboardID a),(a),return) SDL_DYNAPI_PROC(const Uint8*,SDL_GetKeyboardState,(int *a),(a),return) SDL_DYNAPI_PROC(SDL_KeyboardID*,SDL_GetKeyboards,(int *a),(a),return) SDL_DYNAPI_PROC(void,SDL_GetLogOutputFunction,(SDL_LogOutputFunction *a, void **b),(a,b),) @@ -384,7 +384,7 @@ SDL_DYNAPI_PROC(void,SDL_GetMemoryFunctions,(SDL_malloc_func *a, SDL_calloc_func SDL_DYNAPI_PROC(SDL_MouseID*,SDL_GetMice,(int *a),(a),return) SDL_DYNAPI_PROC(SDL_Keymod,SDL_GetModState,(void),(),return) SDL_DYNAPI_PROC(SDL_Window*,SDL_GetMouseFocus,(void),(),return) -SDL_DYNAPI_PROC(const char*,SDL_GetMouseNameFromID,(SDL_MouseID a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GetMouseNameForID,(SDL_MouseID a),(a),return) SDL_DYNAPI_PROC(SDL_MouseButtonFlags,SDL_GetMouseState,(float *a, float *b),(a,b),return) SDL_DYNAPI_PROC(SDL_DisplayOrientation,SDL_GetNaturalDisplayOrientation,(SDL_DisplayID a),(a),return) SDL_DYNAPI_PROC(int,SDL_GetNumAllocations,(void),(),return) @@ -425,7 +425,7 @@ SDL_DYNAPI_PROC(SDL_PropertyType,SDL_GetPropertyType,(SDL_PropertiesID a, const SDL_DYNAPI_PROC(void,SDL_GetRGB,(Uint32 a, const SDL_PixelFormatDetails *b, const SDL_Palette *c, Uint8 *d, Uint8 *e, Uint8 *f),(a,b,c,d,e,f),) SDL_DYNAPI_PROC(void,SDL_GetRGBA,(Uint32 a, const SDL_PixelFormatDetails *b, const SDL_Palette *c, Uint8 *d, Uint8 *e, Uint8 *f, Uint8 *g),(a,b,c,d,e,f,g),) SDL_DYNAPI_PROC(SDL_GamepadType,SDL_GetRealGamepadType,(SDL_Gamepad *a),(a),return) -SDL_DYNAPI_PROC(SDL_GamepadType,SDL_GetRealGamepadTypeFromID,(SDL_JoystickID a),(a),return) +SDL_DYNAPI_PROC(SDL_GamepadType,SDL_GetRealGamepadTypeForID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_bool,SDL_GetRectAndLineIntersection,(const SDL_Rect *a, int *b, int *c, int *d, int *e),(a,b,c,d,e),return) SDL_DYNAPI_PROC(SDL_bool,SDL_GetRectAndLineIntersectionFloat,(const SDL_FRect *a, float *b, float *c, float *d, float *e),(a,b,c,d,e),return) SDL_DYNAPI_PROC(SDL_bool,SDL_GetRectEnclosingPoints,(const SDL_Point *a, int b, const SDL_Rect *c, SDL_Rect *d),(a,b,c,d),return) @@ -466,12 +466,12 @@ SDL_DYNAPI_PROC(int,SDL_GetSensorData,(SDL_Sensor *a, float *b, int c),(a,b,c),r SDL_DYNAPI_PROC(SDL_Sensor*,SDL_GetSensorFromID,(SDL_SensorID a),(a),return) SDL_DYNAPI_PROC(SDL_SensorID,SDL_GetSensorID,(SDL_Sensor *a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetSensorName,(SDL_Sensor *a),(a),return) -SDL_DYNAPI_PROC(const char*,SDL_GetSensorNameFromID,(SDL_SensorID a),(a),return) +SDL_DYNAPI_PROC(const char*,SDL_GetSensorNameForID,(SDL_SensorID a),(a),return) SDL_DYNAPI_PROC(int,SDL_GetSensorNonPortableType,(SDL_Sensor *a),(a),return) -SDL_DYNAPI_PROC(int,SDL_GetSensorNonPortableTypeFromID,(SDL_SensorID a),(a),return) +SDL_DYNAPI_PROC(int,SDL_GetSensorNonPortableTypeForID,(SDL_SensorID a),(a),return) SDL_DYNAPI_PROC(SDL_PropertiesID,SDL_GetSensorProperties,(SDL_Sensor *a),(a),return) SDL_DYNAPI_PROC(SDL_SensorType,SDL_GetSensorType,(SDL_Sensor *a),(a),return) -SDL_DYNAPI_PROC(SDL_SensorType,SDL_GetSensorTypeFromID,(SDL_SensorID a),(a),return) +SDL_DYNAPI_PROC(SDL_SensorType,SDL_GetSensorTypeForID,(SDL_SensorID a),(a),return) SDL_DYNAPI_PROC(SDL_SensorID*,SDL_GetSensors,(int *a),(a),return) SDL_DYNAPI_PROC(int,SDL_GetSilenceValueForFormat,(SDL_AudioFormat a),(a),return) SDL_DYNAPI_PROC(int,SDL_GetStorageFileSize,(SDL_Storage *a, const char *b, Uint64 *c),(a,b,c),return) diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c index e008771ac272c..ec72ce80921f0 100644 --- a/src/events/SDL_keyboard.c +++ b/src/events/SDL_keyboard.c @@ -201,7 +201,7 @@ SDL_KeyboardID *SDL_GetKeyboards(int *count) return keyboards; } -const char *SDL_GetKeyboardNameFromID(SDL_KeyboardID instance_id) +const char *SDL_GetKeyboardNameForID(SDL_KeyboardID instance_id) { int keyboard_index = SDL_GetKeyboardIndex(instance_id); if (keyboard_index < 0) { diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index c34ee70c10977..f6a4d1c5353f4 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -312,7 +312,7 @@ void SDL_RemoveMouse(SDL_MouseID mouseID, SDL_bool send_event) return; } - SDL_FreeLater(SDL_mice[mouse_index].name); // SDL_GetMouseNameFromID returns this pointer. + SDL_FreeLater(SDL_mice[mouse_index].name); // SDL_GetMouseNameForID returns this pointer. if (mouse_index != SDL_mouse_count - 1) { SDL_memcpy(&SDL_mice[mouse_index], &SDL_mice[mouse_index + 1], (SDL_mouse_count - mouse_index - 1) * sizeof(SDL_mice[mouse_index])); @@ -370,7 +370,7 @@ SDL_MouseID *SDL_GetMice(int *count) return mice; } -const char *SDL_GetMouseNameFromID(SDL_MouseID instance_id) +const char *SDL_GetMouseNameForID(SDL_MouseID instance_id) { int mouse_index = SDL_GetMouseIndex(instance_id); if (mouse_index < 0) { diff --git a/src/haptic/SDL_haptic.c b/src/haptic/SDL_haptic.c index df1105c6c1acc..ca4e279afebf1 100644 --- a/src/haptic/SDL_haptic.c +++ b/src/haptic/SDL_haptic.c @@ -92,7 +92,7 @@ SDL_HapticID *SDL_GetHaptics(int *count) return haptics; } -const char *SDL_GetHapticNameFromID(SDL_HapticID instance_id) +const char *SDL_GetHapticNameForID(SDL_HapticID instance_id) { int device_index; const char *name = NULL; diff --git a/src/joystick/SDL_gamepad.c b/src/joystick/SDL_gamepad.c index 17951c8bd1aa2..4e33db0f32df3 100644 --- a/src/joystick/SDL_gamepad.c +++ b/src/joystick/SDL_gamepad.c @@ -1324,7 +1324,7 @@ static void SDL_UpdateGamepadType(SDL_Gamepad *gamepad) } } if (gamepad->type == SDL_GAMEPAD_TYPE_UNKNOWN) { - gamepad->type = SDL_GetRealGamepadTypeFromID(gamepad->joystick->instance_id); + gamepad->type = SDL_GetRealGamepadTypeForID(gamepad->joystick->instance_id); } } @@ -1778,8 +1778,8 @@ static GamepadMapping_t *SDL_PrivateGetGamepadMapping(SDL_JoystickID instance_id SDL_AssertJoysticksLocked(); - name = SDL_GetJoystickNameFromID(instance_id); - guid = SDL_GetJoystickGUIDFromID(instance_id); + name = SDL_GetJoystickNameForID(instance_id); + guid = SDL_GetJoystickGUIDForID(instance_id); mapping = SDL_PrivateGetGamepadMappingForNameAndGUID(name, guid); if (!mapping && create_mapping) { SDL_GamepadMapping raw_map; @@ -2246,7 +2246,7 @@ char *SDL_GetGamepadMapping(SDL_Gamepad *gamepad) */ int SDL_SetGamepadMapping(SDL_JoystickID instance_id, const char *mapping) { - SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id); + SDL_JoystickGUID guid = SDL_GetJoystickGUIDForID(instance_id); int retval = -1; if (SDL_memcmp(&guid, &s_zeroGUID, sizeof(guid)) == 0) { @@ -2420,7 +2420,7 @@ SDL_JoystickID *SDL_GetGamepads(int *count) return joysticks; } -const char *SDL_GetGamepadNameFromID(SDL_JoystickID instance_id) +const char *SDL_GetGamepadNameForID(SDL_JoystickID instance_id) { const char *retval = NULL; @@ -2429,7 +2429,7 @@ const char *SDL_GetGamepadNameFromID(SDL_JoystickID instance_id) GamepadMapping_t *mapping = SDL_PrivateGetGamepadMapping(instance_id, SDL_TRUE); if (mapping) { if (SDL_strcmp(mapping->name, "*") == 0) { - retval = SDL_GetJoystickNameFromID(instance_id); + retval = SDL_GetJoystickNameForID(instance_id); } else { retval = mapping->name; } @@ -2440,37 +2440,37 @@ const char *SDL_GetGamepadNameFromID(SDL_JoystickID instance_id) return retval; } -const char *SDL_GetGamepadPathFromID(SDL_JoystickID instance_id) +const char *SDL_GetGamepadPathForID(SDL_JoystickID instance_id) { - return SDL_GetJoystickPathFromID(instance_id); + return SDL_GetJoystickPathForID(instance_id); } -int SDL_GetGamepadPlayerIndexFromID(SDL_JoystickID instance_id) +int SDL_GetGamepadPlayerIndexForID(SDL_JoystickID instance_id) { - return SDL_GetJoystickPlayerIndexFromID(instance_id); + return SDL_GetJoystickPlayerIndexForID(instance_id); } -SDL_JoystickGUID SDL_GetGamepadGUIDFromID(SDL_JoystickID instance_id) +SDL_JoystickGUID SDL_GetGamepadGUIDForID(SDL_JoystickID instance_id) { - return SDL_GetJoystickGUIDFromID(instance_id); + return SDL_GetJoystickGUIDForID(instance_id); } -Uint16 SDL_GetGamepadVendorFromID(SDL_JoystickID instance_id) +Uint16 SDL_GetGamepadVendorForID(SDL_JoystickID instance_id) { - return SDL_GetJoystickVendorFromID(instance_id); + return SDL_GetJoystickVendorForID(instance_id); } -Uint16 SDL_GetGamepadProductFromID(SDL_JoystickID instance_id) +Uint16 SDL_GetGamepadProductForID(SDL_JoystickID instance_id) { - return SDL_GetJoystickProductFromID(instance_id); + return SDL_GetJoystickProductForID(instance_id); } -Uint16 SDL_GetGamepadProductVersionFromID(SDL_JoystickID instance_id) +Uint16 SDL_GetGamepadProductVersionForID(SDL_JoystickID instance_id) { - return SDL_GetJoystickProductVersionFromID(instance_id); + return SDL_GetJoystickProductVersionForID(instance_id); } -SDL_GamepadType SDL_GetGamepadTypeFromID(SDL_JoystickID instance_id) +SDL_GamepadType SDL_GetGamepadTypeForID(SDL_JoystickID instance_id) { SDL_GamepadType type = SDL_GAMEPAD_TYPE_UNKNOWN; @@ -2497,21 +2497,21 @@ SDL_GamepadType SDL_GetGamepadTypeFromID(SDL_JoystickID instance_id) if (type != SDL_GAMEPAD_TYPE_UNKNOWN) { return type; } - return SDL_GetRealGamepadTypeFromID(instance_id); + return SDL_GetRealGamepadTypeForID(instance_id); } -SDL_GamepadType SDL_GetRealGamepadTypeFromID(SDL_JoystickID instance_id) +SDL_GamepadType SDL_GetRealGamepadTypeForID(SDL_JoystickID instance_id) { SDL_GamepadType type = SDL_GAMEPAD_TYPE_UNKNOWN; const SDL_SteamVirtualGamepadInfo *info; SDL_LockJoysticks(); { - info = SDL_GetJoystickVirtualGamepadInfoFromID(instance_id); + info = SDL_GetJoystickVirtualGamepadInfoForID(instance_id); if (info) { type = info->type; } else { - type = SDL_GetGamepadTypeFromGUID(SDL_GetJoystickGUIDFromID(instance_id), SDL_GetJoystickNameFromID(instance_id)); + type = SDL_GetGamepadTypeFromGUID(SDL_GetJoystickGUIDForID(instance_id), SDL_GetJoystickNameForID(instance_id)); } } SDL_UnlockJoysticks(); @@ -2519,7 +2519,7 @@ SDL_GamepadType SDL_GetRealGamepadTypeFromID(SDL_JoystickID instance_id) return type; } -char *SDL_GetGamepadMappingFromID(SDL_JoystickID instance_id) +char *SDL_GetGamepadMappingForID(SDL_JoystickID instance_id) { char *retval = NULL; @@ -2528,7 +2528,7 @@ char *SDL_GetGamepadMappingFromID(SDL_JoystickID instance_id) GamepadMapping_t *mapping = SDL_PrivateGetGamepadMapping(instance_id, SDL_TRUE); if (mapping) { char pchGUID[33]; - const SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id); + const SDL_JoystickGUID guid = SDL_GetJoystickGUIDForID(instance_id); SDL_GetJoystickGUIDString(guid, pchGUID, sizeof(pchGUID)); SDL_asprintf(&retval, "%s,%s,%s", pchGUID, mapping->name, mapping->mapping); } @@ -3336,7 +3336,7 @@ SDL_GamepadType SDL_GetGamepadType(SDL_Gamepad *gamepad) { CHECK_GAMEPAD_MAGIC(gamepad, SDL_GAMEPAD_TYPE_UNKNOWN); - info = SDL_GetJoystickVirtualGamepadInfoFromID(gamepad->joystick->instance_id); + info = SDL_GetJoystickVirtualGamepadInfoForID(gamepad->joystick->instance_id); if (info) { type = info->type; } else { diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 78104a44e092b..1072b2fc484ef 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -754,7 +754,7 @@ SDL_JoystickID *SDL_GetJoysticks(int *count) return joysticks; } -const SDL_SteamVirtualGamepadInfo *SDL_GetJoystickVirtualGamepadInfoFromID(SDL_JoystickID instance_id) +const SDL_SteamVirtualGamepadInfo *SDL_GetJoystickVirtualGamepadInfoForID(SDL_JoystickID instance_id) { SDL_JoystickDriver *driver; int device_index; @@ -770,7 +770,7 @@ const SDL_SteamVirtualGamepadInfo *SDL_GetJoystickVirtualGamepadInfoFromID(SDL_J /* * Get the implementation dependent name of a joystick */ -const char *SDL_GetJoystickNameFromID(SDL_JoystickID instance_id) +const char *SDL_GetJoystickNameForID(SDL_JoystickID instance_id) { SDL_JoystickDriver *driver; int device_index; @@ -778,7 +778,7 @@ const char *SDL_GetJoystickNameFromID(SDL_JoystickID instance_id) const SDL_SteamVirtualGamepadInfo *info; SDL_LockJoysticks(); - info = SDL_GetJoystickVirtualGamepadInfoFromID(instance_id); + info = SDL_GetJoystickVirtualGamepadInfoForID(instance_id); if (info) { name = info->name; } else if (SDL_GetDriverAndJoystickIndex(instance_id, &driver, &device_index)) { @@ -792,7 +792,7 @@ const char *SDL_GetJoystickNameFromID(SDL_JoystickID instance_id) /* * Get the implementation dependent path of a joystick */ -const char *SDL_GetJoystickPathFromID(SDL_JoystickID instance_id) +const char *SDL_GetJoystickPathForID(SDL_JoystickID instance_id) { SDL_JoystickDriver *driver; int device_index; @@ -813,7 +813,7 @@ const char *SDL_GetJoystickPathFromID(SDL_JoystickID instance_id) /* * Get the player index of a joystick, or -1 if it's not available */ -int SDL_GetJoystickPlayerIndexFromID(SDL_JoystickID instance_id) +int SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id) { int player_index; @@ -864,14 +864,14 @@ static SDL_bool IsROGAlly(SDL_Joystick *joystick) for (i = 0; sensors[i]; ++i) { SDL_SensorID sensor = sensors[i]; - if (!has_ally_accel && SDL_GetSensorTypeFromID(sensor) == SDL_SENSOR_ACCEL) { - const char *sensor_name = SDL_GetSensorNameFromID(sensor); + if (!has_ally_accel && SDL_GetSensorTypeForID(sensor) == SDL_SENSOR_ACCEL) { + const char *sensor_name = SDL_GetSensorNameForID(sensor); if (sensor_name && SDL_strcmp(sensor_name, "Sensor BMI320 Acc") == 0) { has_ally_accel = SDL_TRUE; } } - if (!has_ally_gyro && SDL_GetSensorTypeFromID(sensor) == SDL_SENSOR_GYRO) { - const char *sensor_name = SDL_GetSensorNameFromID(sensor); + if (!has_ally_gyro && SDL_GetSensorTypeForID(sensor) == SDL_SENSOR_GYRO) { + const char *sensor_name = SDL_GetSensorNameForID(sensor); if (sensor_name && SDL_strcmp(sensor_name, "Sensor BMI320 Gyr") == 0) { has_ally_gyro = SDL_TRUE; } @@ -966,14 +966,14 @@ static void AttemptSensorFusion(SDL_Joystick *joystick, SDL_bool invert_sensors) for (i = 0; sensors[i]; ++i) { SDL_SensorID sensor = sensors[i]; - if (!joystick->accel_sensor && SDL_GetSensorTypeFromID(sensor) == SDL_SENSOR_ACCEL) { + if (!joystick->accel_sensor && SDL_GetSensorTypeForID(sensor) == SDL_SENSOR_ACCEL) { /* Increment the sensor subsystem reference count */ SDL_InitSubSystem(SDL_INIT_SENSOR); joystick->accel_sensor = sensor; SDL_PrivateJoystickAddSensor(joystick, SDL_SENSOR_ACCEL, 0.0f); } - if (!joystick->gyro_sensor && SDL_GetSensorTypeFromID(sensor) == SDL_SENSOR_GYRO) { + if (!joystick->gyro_sensor && SDL_GetSensorTypeForID(sensor) == SDL_SENSOR_GYRO) { /* Increment the sensor subsystem reference count */ SDL_InitSubSystem(SDL_INIT_SENSOR); @@ -1151,7 +1151,7 @@ SDL_Joystick *SDL_OpenJoystick(SDL_JoystickID instance_id) } /* Get the Steam Input API handle */ - info = SDL_GetJoystickVirtualGamepadInfoFromID(instance_id); + info = SDL_GetJoystickVirtualGamepadInfoForID(instance_id); if (info) { joystick->steam_handle = info->handle; } @@ -1651,7 +1651,7 @@ const char *SDL_GetJoystickName(SDL_Joystick *joystick) { CHECK_JOYSTICK_MAGIC(joystick, NULL); - info = SDL_GetJoystickVirtualGamepadInfoFromID(joystick->instance_id); + info = SDL_GetJoystickVirtualGamepadInfoForID(joystick->instance_id); if (info) { retval = info->name; } else { @@ -2362,7 +2362,7 @@ static void SendSteamHandleUpdateEvents(void) continue; } - info = SDL_GetJoystickVirtualGamepadInfoFromID(joystick->instance_id); + info = SDL_GetJoystickVirtualGamepadInfoForID(joystick->instance_id); if (info) { if (joystick->steam_handle != info->handle) { joystick->steam_handle = info->handle; @@ -3258,7 +3258,7 @@ SDL_bool SDL_ShouldIgnoreJoystick(const char *name, SDL_JoystickGUID guid) } /* return the guid for this index */ -SDL_JoystickGUID SDL_GetJoystickGUIDFromID(SDL_JoystickID instance_id) +SDL_JoystickGUID SDL_GetJoystickGUIDForID(SDL_JoystickID instance_id) { SDL_JoystickDriver *driver; int device_index; @@ -3275,17 +3275,17 @@ SDL_JoystickGUID SDL_GetJoystickGUIDFromID(SDL_JoystickID instance_id) return guid; } -Uint16 SDL_GetJoystickVendorFromID(SDL_JoystickID instance_id) +Uint16 SDL_GetJoystickVendorForID(SDL_JoystickID instance_id) { Uint16 vendor; const SDL_SteamVirtualGamepadInfo *info; SDL_LockJoysticks(); - info = SDL_GetJoystickVirtualGamepadInfoFromID(instance_id); + info = SDL_GetJoystickVirtualGamepadInfoForID(instance_id); if (info) { vendor = info->vendor_id; } else { - SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id); + SDL_JoystickGUID guid = SDL_GetJoystickGUIDForID(instance_id); SDL_GetJoystickGUIDInfo(guid, &vendor, NULL, NULL, NULL); } @@ -3294,17 +3294,17 @@ Uint16 SDL_GetJoystickVendorFromID(SDL_JoystickID instance_id) return vendor; } -Uint16 SDL_GetJoystickProductFromID(SDL_JoystickID instance_id) +Uint16 SDL_GetJoystickProductForID(SDL_JoystickID instance_id) { Uint16 product; const SDL_SteamVirtualGamepadInfo *info; SDL_LockJoysticks(); - info = SDL_GetJoystickVirtualGamepadInfoFromID(instance_id); + info = SDL_GetJoystickVirtualGamepadInfoForID(instance_id); if (info) { product = info->product_id; } else { - SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id); + SDL_JoystickGUID guid = SDL_GetJoystickGUIDForID(instance_id); SDL_GetJoystickGUIDInfo(guid, NULL, &product, NULL, NULL); } @@ -3313,19 +3313,19 @@ Uint16 SDL_GetJoystickProductFromID(SDL_JoystickID instance_id) return product; } -Uint16 SDL_GetJoystickProductVersionFromID(SDL_JoystickID instance_id) +Uint16 SDL_GetJoystickProductVersionForID(SDL_JoystickID instance_id) { Uint16 version; - SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id); + SDL_JoystickGUID guid = SDL_GetJoystickGUIDForID(instance_id); SDL_GetJoystickGUIDInfo(guid, NULL, NULL, &version, NULL); return version; } -SDL_JoystickType SDL_GetJoystickTypeFromID(SDL_JoystickID instance_id) +SDL_JoystickType SDL_GetJoystickTypeForID(SDL_JoystickID instance_id) { SDL_JoystickType type; - SDL_JoystickGUID guid = SDL_GetJoystickGUIDFromID(instance_id); + SDL_JoystickGUID guid = SDL_GetJoystickGUIDForID(instance_id); type = SDL_GetJoystickGUIDType(guid); if (type == SDL_JOYSTICK_TYPE_UNKNOWN) { @@ -3362,7 +3362,7 @@ Uint16 SDL_GetJoystickVendor(SDL_Joystick *joystick) { CHECK_JOYSTICK_MAGIC(joystick, 0); - info = SDL_GetJoystickVirtualGamepadInfoFromID(joystick->instance_id); + info = SDL_GetJoystickVirtualGamepadInfoForID(joystick->instance_id); if (info) { vendor = info->vendor_id; } else { @@ -3385,7 +3385,7 @@ Uint16 SDL_GetJoystickProduct(SDL_Joystick *joystick) { CHECK_JOYSTICK_MAGIC(joystick, 0); - info = SDL_GetJoystickVirtualGamepadInfoFromID(joystick->instance_id); + info = SDL_GetJoystickVirtualGamepadInfoForID(joystick->instance_id); if (info) { product = info->product_id; } else { diff --git a/src/joystick/SDL_joystick_c.h b/src/joystick/SDL_joystick_c.h index ea483aa1d1e4f..c8ac9a3591f70 100644 --- a/src/joystick/SDL_joystick_c.h +++ b/src/joystick/SDL_joystick_c.h @@ -170,7 +170,7 @@ extern int SDL_SendJoystickSensor(Uint64 timestamp, SDL_Joystick *joystick, SDL_ extern void SDL_SendJoystickPowerInfo(SDL_Joystick *joystick, SDL_PowerState state, int percent); /* Function to get the Steam virtual gamepad info for a joystick */ -extern const struct SDL_SteamVirtualGamepadInfo *SDL_GetJoystickVirtualGamepadInfoFromID(SDL_JoystickID instance_id); +extern const struct SDL_SteamVirtualGamepadInfo *SDL_GetJoystickVirtualGamepadInfoForID(SDL_JoystickID instance_id); /* Internal sanity checking functions */ extern SDL_bool SDL_IsJoystickValid(SDL_Joystick *joystick); diff --git a/src/sensor/SDL_sensor.c b/src/sensor/SDL_sensor.c index 9a4ddf4e930a3..141ca0d78ada8 100644 --- a/src/sensor/SDL_sensor.c +++ b/src/sensor/SDL_sensor.c @@ -238,7 +238,7 @@ static SDL_bool SDL_GetDriverAndSensorIndex(SDL_SensorID instance_id, SDL_Sensor /* * Get the implementation dependent name of a sensor */ -const char *SDL_GetSensorNameFromID(SDL_SensorID instance_id) +const char *SDL_GetSensorNameForID(SDL_SensorID instance_id) { SDL_SensorDriver *driver; int device_index; @@ -253,7 +253,7 @@ const char *SDL_GetSensorNameFromID(SDL_SensorID instance_id) return name ? SDL_FreeLater(SDL_strdup(name)) : NULL; } -SDL_SensorType SDL_GetSensorTypeFromID(SDL_SensorID instance_id) +SDL_SensorType SDL_GetSensorTypeForID(SDL_SensorID instance_id) { SDL_SensorDriver *driver; int device_index; @@ -268,7 +268,7 @@ SDL_SensorType SDL_GetSensorTypeFromID(SDL_SensorID instance_id) return type; } -int SDL_GetSensorNonPortableTypeFromID(SDL_SensorID instance_id) +int SDL_GetSensorNonPortableTypeForID(SDL_SensorID instance_id) { SDL_SensorDriver *driver; int device_index; diff --git a/test/testhaptic.c b/test/testhaptic.c index 077383f3bd461..51017b9b8890b 100644 --- a/test/testhaptic.c +++ b/test/testhaptic.c @@ -86,7 +86,7 @@ int main(int argc, char **argv) haptics = SDL_GetHaptics(&num_haptics); SDL_Log("%d Haptic devices detected.\n", num_haptics); for (i = 0; i < num_haptics; ++i) { - SDL_Log(" %s\n", SDL_GetHapticNameFromID(haptics[i])); + SDL_Log(" %s\n", SDL_GetHapticNameForID(haptics[i])); } if (haptics) { if (num_haptics == 0) { @@ -108,7 +108,7 @@ int main(int argc, char **argv) /* Try to find matching device */ else { for (i = 0; i < num_haptics; i++) { - if (SDL_strstr(SDL_GetHapticNameFromID(haptics[i]), name) != NULL) { + if (SDL_strstr(SDL_GetHapticNameForID(haptics[i]), name) != NULL) { break; } } diff --git a/test/testhotplug.c b/test/testhotplug.c index d28249b198878..ec635c1bf4fe3 100644 --- a/test/testhotplug.c +++ b/test/testhotplug.c @@ -103,13 +103,13 @@ int main(int argc, char *argv[]) keepGoing = SDL_FALSE; break; case SDL_EVENT_KEYBOARD_ADDED: - SDL_Log("Keyboard '%s' added : %" SDL_PRIu32 "\n", SDL_GetKeyboardNameFromID(event.kdevice.which), event.kdevice.which); + SDL_Log("Keyboard '%s' added : %" SDL_PRIu32 "\n", SDL_GetKeyboardNameForID(event.kdevice.which), event.kdevice.which); break; case SDL_EVENT_KEYBOARD_REMOVED: SDL_Log("Keyboard removed: %" SDL_PRIu32 "\n", event.kdevice.which); break; case SDL_EVENT_MOUSE_ADDED: - SDL_Log("Mouse '%s' added : %" SDL_PRIu32 "\n", SDL_GetMouseNameFromID(event.mdevice.which), event.mdevice.which); + SDL_Log("Mouse '%s' added : %" SDL_PRIu32 "\n", SDL_GetMouseNameForID(event.mdevice.which), event.mdevice.which); break; case SDL_EVENT_MOUSE_REMOVED: SDL_Log("Mouse removed: %" SDL_PRIu32 "\n", event.mdevice.which); diff --git a/test/testrumble.c b/test/testrumble.c index e2d4c63166263..ee957181cc1c3 100644 --- a/test/testrumble.c +++ b/test/testrumble.c @@ -109,7 +109,7 @@ int main(int argc, char **argv) /* Try to find matching device */ else { for (i = 0; i < num_haptics; i++) { - if (SDL_strstr(SDL_GetHapticNameFromID(haptics[i]), name) != NULL) { + if (SDL_strstr(SDL_GetHapticNameForID(haptics[i]), name) != NULL) { break; } } diff --git a/test/testsensor.c b/test/testsensor.c index 77ad36a935b8c..404c9723bf3c4 100644 --- a/test/testsensor.c +++ b/test/testsensor.c @@ -91,11 +91,11 @@ int main(int argc, char **argv) for (i = 0; i < num_sensors; ++i) { SDL_Log("Sensor %" SDL_PRIu32 ": %s, type %s, platform type %d\n", sensors[i], - SDL_GetSensorNameFromID(sensors[i]), - GetSensorTypeString(SDL_GetSensorTypeFromID(sensors[i])), - SDL_GetSensorNonPortableTypeFromID(sensors[i])); + SDL_GetSensorNameForID(sensors[i]), + GetSensorTypeString(SDL_GetSensorTypeForID(sensors[i])), + SDL_GetSensorNonPortableTypeForID(sensors[i])); - if (SDL_GetSensorTypeFromID(sensors[i]) != SDL_SENSOR_UNKNOWN) { + if (SDL_GetSensorTypeForID(sensors[i]) != SDL_SENSOR_UNKNOWN) { SDL_Sensor *sensor = SDL_OpenSensor(sensors[i]); if (!sensor) { SDL_Log("Couldn't open sensor %" SDL_PRIu32 ": %s\n", sensors[i], SDL_GetError());