Renamed *FromInstanceID() to *FromID()

This commit is contained in:
Sam Lantinga 2024-07-14 12:06:35 -07:00
parent cad9e6ea20
commit d154b37b41
29 changed files with 62 additions and 62 deletions

View file

@ -574,7 +574,7 @@ The following functions have been renamed:
* SDL_GameControllerAddMappingsFromFile() => SDL_AddGamepadMappingsFromFile() * SDL_GameControllerAddMappingsFromFile() => SDL_AddGamepadMappingsFromFile()
* SDL_GameControllerAddMappingsFromRW() => SDL_AddGamepadMappingsFromIO() * SDL_GameControllerAddMappingsFromRW() => SDL_AddGamepadMappingsFromIO()
* SDL_GameControllerClose() => SDL_CloseGamepad() * SDL_GameControllerClose() => SDL_CloseGamepad()
* SDL_GameControllerFromInstanceID() => SDL_GetGamepadFromInstanceID() * SDL_GameControllerFromInstanceID() => SDL_GetGamepadFromID()
* SDL_GameControllerFromPlayerIndex() => SDL_GetGamepadFromPlayerIndex() * SDL_GameControllerFromPlayerIndex() => SDL_GetGamepadFromPlayerIndex()
* SDL_GameControllerGetAppleSFSymbolsNameForAxis() => SDL_GetGamepadAppleSFSymbolsNameForAxis() * SDL_GameControllerGetAppleSFSymbolsNameForAxis() => SDL_GetGamepadAppleSFSymbolsNameForAxis()
* SDL_GameControllerGetAppleSFSymbolsNameForButton() => SDL_GetGamepadAppleSFSymbolsNameForButton() * SDL_GameControllerGetAppleSFSymbolsNameForButton() => SDL_GetGamepadAppleSFSymbolsNameForButton()
@ -743,7 +743,7 @@ The following functions have been renamed:
The following functions have been removed: The following functions have been removed:
* SDL_HapticIndex() - replaced with SDL_GetHapticID() * SDL_HapticIndex() - replaced with SDL_GetHapticID()
* SDL_HapticName() - replaced with SDL_GetHapticNameFromID() * SDL_HapticName() - replaced with SDL_GetHapticNameFromID()
* SDL_HapticOpened() - replaced with SDL_GetHapticFromInstanceID() * SDL_HapticOpened() - replaced with SDL_GetHapticFromID()
* SDL_NumHaptics() - replaced with SDL_GetHaptics() * SDL_NumHaptics() - replaced with SDL_GetHaptics()
## SDL_hints.h ## SDL_hints.h
@ -855,7 +855,7 @@ The following functions have been renamed:
* SDL_JoystickAttachVirtualEx() => SDL_AttachVirtualJoystick() * SDL_JoystickAttachVirtualEx() => SDL_AttachVirtualJoystick()
* SDL_JoystickClose() => SDL_CloseJoystick() * SDL_JoystickClose() => SDL_CloseJoystick()
* SDL_JoystickDetachVirtual() => SDL_DetachVirtualJoystick() * SDL_JoystickDetachVirtual() => SDL_DetachVirtualJoystick()
* SDL_JoystickFromInstanceID() => SDL_GetJoystickFromInstanceID() * SDL_JoystickFromInstanceID() => SDL_GetJoystickFromID()
* SDL_JoystickFromPlayerIndex() => SDL_GetJoystickFromPlayerIndex() * SDL_JoystickFromPlayerIndex() => SDL_GetJoystickFromPlayerIndex()
* SDL_JoystickGetAttached() => SDL_JoystickConnected() * SDL_JoystickGetAttached() => SDL_JoystickConnected()
* SDL_JoystickGetAxis() => SDL_GetJoystickAxis() * SDL_JoystickGetAxis() => SDL_GetJoystickAxis()
@ -1587,7 +1587,7 @@ Removed SDL_SensorGetDataWithTimestamp(), if you want timestamps for the sensor
The following functions have been renamed: The following functions have been renamed:
* SDL_SensorClose() => SDL_CloseSensor() * SDL_SensorClose() => SDL_CloseSensor()
* SDL_SensorFromInstanceID() => SDL_GetSensorFromInstanceID() * SDL_SensorFromInstanceID() => SDL_GetSensorFromID()
* SDL_SensorGetData() => SDL_GetSensorData() * SDL_SensorGetData() => SDL_GetSensorData()
* SDL_SensorGetInstanceID() => SDL_GetSensorID() * SDL_SensorGetInstanceID() => SDL_GetSensorID()
* SDL_SensorGetName() => SDL_GetSensorName() * SDL_SensorGetName() => SDL_GetSensorName()

View file

@ -626,7 +626,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersionFromID(SDL_Joysti
* *
* \sa SDL_GetGamepadType * \sa SDL_GetGamepadType
* \sa SDL_GetGamepads * \sa SDL_GetGamepads
* \sa SDL_GetRealGamepadInstanceType * \sa SDL_GetRealGamepadTypeFromID
*/ */
extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeFromID(SDL_JoystickID instance_id); extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeFromID(SDL_JoystickID instance_id);
@ -644,7 +644,7 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeFromID(SDL_Joystic
* \sa SDL_GetGamepads * \sa SDL_GetGamepads
* \sa SDL_GetRealGamepadType * \sa SDL_GetRealGamepadType
*/ */
extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadInstanceType(SDL_JoystickID instance_id); extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeFromID(SDL_JoystickID instance_id);
/** /**
* Get the mapping of a gamepad. * Get the mapping of a gamepad.
@ -686,7 +686,7 @@ extern SDL_DECLSPEC SDL_Gamepad *SDLCALL SDL_OpenGamepad(SDL_JoystickID instance
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern SDL_DECLSPEC SDL_Gamepad *SDLCALL SDL_GetGamepadFromInstanceID(SDL_JoystickID instance_id); extern SDL_DECLSPEC SDL_Gamepad *SDLCALL SDL_GetGamepadFromID(SDL_JoystickID instance_id);
/** /**
* Get the SDL_Gamepad associated with a player index. * Get the SDL_Gamepad associated with a player index.
@ -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. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_GetRealGamepadInstanceType * \sa SDL_GetRealGamepadTypeFromID
*/ */
extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadType(SDL_Gamepad *gamepad); extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadType(SDL_Gamepad *gamepad);

View file

@ -998,7 +998,7 @@ extern SDL_DECLSPEC SDL_Haptic *SDLCALL SDL_OpenHaptic(SDL_HapticID instance_id)
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern SDL_DECLSPEC SDL_Haptic *SDLCALL SDL_GetHapticFromInstanceID(SDL_HapticID instance_id); extern SDL_DECLSPEC SDL_Haptic *SDLCALL SDL_GetHapticFromID(SDL_HapticID instance_id);
/** /**
* Get the instance ID of an opened haptic device. * Get the instance ID of an opened haptic device.

View file

@ -382,7 +382,7 @@ extern SDL_DECLSPEC SDL_Joystick *SDLCALL SDL_OpenJoystick(SDL_JoystickID instan
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern SDL_DECLSPEC SDL_Joystick *SDLCALL SDL_GetJoystickFromInstanceID(SDL_JoystickID instance_id); extern SDL_DECLSPEC SDL_Joystick *SDLCALL SDL_GetJoystickFromID(SDL_JoystickID instance_id);
/** /**
* Get the SDL_Joystick associated with a player index. * Get the SDL_Joystick associated with a player index.

View file

@ -221,7 +221,7 @@
#define SDL_GameControllerBindType SDL_GamepadBindingType #define SDL_GameControllerBindType SDL_GamepadBindingType
#define SDL_GameControllerButton SDL_GamepadButton #define SDL_GameControllerButton SDL_GamepadButton
#define SDL_GameControllerClose SDL_CloseGamepad #define SDL_GameControllerClose SDL_CloseGamepad
#define SDL_GameControllerFromInstanceID SDL_GetGamepadFromInstanceID #define SDL_GameControllerFromInstanceID SDL_GetGamepadFromID
#define SDL_GameControllerFromPlayerIndex SDL_GetGamepadFromPlayerIndex #define SDL_GameControllerFromPlayerIndex SDL_GetGamepadFromPlayerIndex
#define SDL_GameControllerGetAppleSFSymbolsNameForAxis SDL_GetGamepadAppleSFSymbolsNameForAxis #define SDL_GameControllerGetAppleSFSymbolsNameForAxis SDL_GetGamepadAppleSFSymbolsNameForAxis
#define SDL_GameControllerGetAppleSFSymbolsNameForButton SDL_GetGamepadAppleSFSymbolsNameForButton #define SDL_GameControllerGetAppleSFSymbolsNameForButton SDL_GetGamepadAppleSFSymbolsNameForButton
@ -307,7 +307,7 @@
#define SDL_JoystickAttachVirtualEx SDL_AttachVirtualJoystick #define SDL_JoystickAttachVirtualEx SDL_AttachVirtualJoystick
#define SDL_JoystickClose SDL_CloseJoystick #define SDL_JoystickClose SDL_CloseJoystick
#define SDL_JoystickDetachVirtual SDL_DetachVirtualJoystick #define SDL_JoystickDetachVirtual SDL_DetachVirtualJoystick
#define SDL_JoystickFromInstanceID SDL_GetJoystickFromInstanceID #define SDL_JoystickFromInstanceID SDL_GetJoystickFromID
#define SDL_JoystickFromPlayerIndex SDL_GetJoystickFromPlayerIndex #define SDL_JoystickFromPlayerIndex SDL_GetJoystickFromPlayerIndex
#define SDL_JoystickGetAttached SDL_JoystickConnected #define SDL_JoystickGetAttached SDL_JoystickConnected
#define SDL_JoystickGetAxis SDL_GetJoystickAxis #define SDL_JoystickGetAxis SDL_GetJoystickAxis
@ -564,7 +564,7 @@
/* ##SDL_sensor.h */ /* ##SDL_sensor.h */
#define SDL_SensorClose SDL_CloseSensor #define SDL_SensorClose SDL_CloseSensor
#define SDL_SensorFromInstanceID SDL_GetSensorFromInstanceID #define SDL_SensorFromInstanceID SDL_GetSensorFromID
#define SDL_SensorGetData SDL_GetSensorData #define SDL_SensorGetData SDL_GetSensorData
#define SDL_SensorGetInstanceID SDL_GetSensorID #define SDL_SensorGetInstanceID SDL_GetSensorID
#define SDL_SensorGetName SDL_GetSensorName #define SDL_SensorGetName SDL_GetSensorName
@ -818,7 +818,7 @@
#define SDL_GameControllerBindType SDL_GameControllerBindType_renamed_SDL_GamepadBindingType #define SDL_GameControllerBindType SDL_GameControllerBindType_renamed_SDL_GamepadBindingType
#define SDL_GameControllerButton SDL_GameControllerButton_renamed_SDL_GamepadButton #define SDL_GameControllerButton SDL_GameControllerButton_renamed_SDL_GamepadButton
#define SDL_GameControllerClose SDL_GameControllerClose_renamed_SDL_CloseGamepad #define SDL_GameControllerClose SDL_GameControllerClose_renamed_SDL_CloseGamepad
#define SDL_GameControllerFromInstanceID SDL_GameControllerFromInstanceID_renamed_SDL_GetGamepadFromInstanceID #define SDL_GameControllerFromInstanceID SDL_GameControllerFromInstanceID_renamed_SDL_GetGamepadFromID
#define SDL_GameControllerFromPlayerIndex SDL_GameControllerFromPlayerIndex_renamed_SDL_GetGamepadFromPlayerIndex #define SDL_GameControllerFromPlayerIndex SDL_GameControllerFromPlayerIndex_renamed_SDL_GetGamepadFromPlayerIndex
#define SDL_GameControllerGetAppleSFSymbolsNameForAxis SDL_GameControllerGetAppleSFSymbolsNameForAxis_renamed_SDL_GetGamepadAppleSFSymbolsNameForAxis #define SDL_GameControllerGetAppleSFSymbolsNameForAxis SDL_GameControllerGetAppleSFSymbolsNameForAxis_renamed_SDL_GetGamepadAppleSFSymbolsNameForAxis
#define SDL_GameControllerGetAppleSFSymbolsNameForButton SDL_GameControllerGetAppleSFSymbolsNameForButton_renamed_SDL_GetGamepadAppleSFSymbolsNameForButton #define SDL_GameControllerGetAppleSFSymbolsNameForButton SDL_GameControllerGetAppleSFSymbolsNameForButton_renamed_SDL_GetGamepadAppleSFSymbolsNameForButton
@ -905,7 +905,7 @@
#define SDL_JoystickAttachVirtualEx SDL_JoystickAttachVirtualEx_renamed_SDL_AttachVirtualJoystick #define SDL_JoystickAttachVirtualEx SDL_JoystickAttachVirtualEx_renamed_SDL_AttachVirtualJoystick
#define SDL_JoystickClose SDL_JoystickClose_renamed_SDL_CloseJoystick #define SDL_JoystickClose SDL_JoystickClose_renamed_SDL_CloseJoystick
#define SDL_JoystickDetachVirtual SDL_JoystickDetachVirtual_renamed_SDL_DetachVirtualJoystick #define SDL_JoystickDetachVirtual SDL_JoystickDetachVirtual_renamed_SDL_DetachVirtualJoystick
#define SDL_JoystickFromInstanceID SDL_JoystickFromInstanceID_renamed_SDL_GetJoystickFromInstanceID #define SDL_JoystickFromInstanceID SDL_JoystickFromInstanceID_renamed_SDL_GetJoystickFromID
#define SDL_JoystickFromPlayerIndex SDL_JoystickFromPlayerIndex_renamed_SDL_GetJoystickFromPlayerIndex #define SDL_JoystickFromPlayerIndex SDL_JoystickFromPlayerIndex_renamed_SDL_GetJoystickFromPlayerIndex
#define SDL_JoystickGetAttached SDL_JoystickGetAttached_renamed_SDL_JoystickConnected #define SDL_JoystickGetAttached SDL_JoystickGetAttached_renamed_SDL_JoystickConnected
#define SDL_JoystickGetAxis SDL_JoystickGetAxis_renamed_SDL_GetJoystickAxis #define SDL_JoystickGetAxis SDL_JoystickGetAxis_renamed_SDL_GetJoystickAxis
@ -1162,7 +1162,7 @@
/* ##SDL_sensor.h */ /* ##SDL_sensor.h */
#define SDL_SensorClose SDL_SensorClose_renamed_SDL_CloseSensor #define SDL_SensorClose SDL_SensorClose_renamed_SDL_CloseSensor
#define SDL_SensorFromInstanceID SDL_SensorFromInstanceID_renamed_SDL_GetSensorFromInstanceID #define SDL_SensorFromInstanceID SDL_SensorFromInstanceID_renamed_SDL_GetSensorFromID
#define SDL_SensorGetData SDL_SensorGetData_renamed_SDL_GetSensorData #define SDL_SensorGetData SDL_SensorGetData_renamed_SDL_GetSensorData
#define SDL_SensorGetInstanceID SDL_SensorGetInstanceID_renamed_SDL_GetSensorID #define SDL_SensorGetInstanceID SDL_SensorGetInstanceID_renamed_SDL_GetSensorID
#define SDL_SensorGetName SDL_SensorGetName_renamed_SDL_GetSensorName #define SDL_SensorGetName SDL_SensorGetName_renamed_SDL_GetSensorName

View file

@ -213,7 +213,7 @@ extern SDL_DECLSPEC SDL_Sensor *SDLCALL SDL_OpenSensor(SDL_SensorID instance_id)
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern SDL_DECLSPEC SDL_Sensor *SDLCALL SDL_GetSensorFromInstanceID(SDL_SensorID instance_id); extern SDL_DECLSPEC SDL_Sensor *SDLCALL SDL_GetSensorFromID(SDL_SensorID instance_id);
/** /**
* Get the properties associated with a sensor. * Get the properties associated with a sensor.

View file

@ -240,7 +240,7 @@ SDL3_0.0.0 {
SDL_GetGamepadButtonLabelForType; SDL_GetGamepadButtonLabelForType;
SDL_GetGamepadConnectionState; SDL_GetGamepadConnectionState;
SDL_GetGamepadFirmwareVersion; SDL_GetGamepadFirmwareVersion;
SDL_GetGamepadFromInstanceID; SDL_GetGamepadFromID;
SDL_GetGamepadFromPlayerIndex; SDL_GetGamepadFromPlayerIndex;
SDL_GetGamepadGUIDFromID; SDL_GetGamepadGUIDFromID;
SDL_GetGamepadID; SDL_GetGamepadID;
@ -280,7 +280,7 @@ SDL3_0.0.0 {
SDL_GetGrabbedWindow; SDL_GetGrabbedWindow;
SDL_GetHapticEffectStatus; SDL_GetHapticEffectStatus;
SDL_GetHapticFeatures; SDL_GetHapticFeatures;
SDL_GetHapticFromInstanceID; SDL_GetHapticFromID;
SDL_GetHapticID; SDL_GetHapticID;
SDL_GetHapticName; SDL_GetHapticName;
SDL_GetHapticNameFromID; SDL_GetHapticNameFromID;
@ -296,7 +296,7 @@ SDL3_0.0.0 {
SDL_GetJoystickButton; SDL_GetJoystickButton;
SDL_GetJoystickConnectionState; SDL_GetJoystickConnectionState;
SDL_GetJoystickFirmwareVersion; SDL_GetJoystickFirmwareVersion;
SDL_GetJoystickFromInstanceID; SDL_GetJoystickFromID;
SDL_GetJoystickFromPlayerIndex; SDL_GetJoystickFromPlayerIndex;
SDL_GetJoystickGUID; SDL_GetJoystickGUID;
SDL_GetJoystickGUIDFromID; SDL_GetJoystickGUIDFromID;
@ -379,7 +379,7 @@ SDL3_0.0.0 {
SDL_GetPropertyType; SDL_GetPropertyType;
SDL_GetRGB; SDL_GetRGB;
SDL_GetRGBA; SDL_GetRGBA;
SDL_GetRealGamepadInstanceType; SDL_GetRealGamepadTypeFromID;
SDL_GetRealGamepadType; SDL_GetRealGamepadType;
SDL_GetRectAndLineIntersection; SDL_GetRectAndLineIntersection;
SDL_GetRectAndLineIntersectionFloat; SDL_GetRectAndLineIntersectionFloat;
@ -418,7 +418,7 @@ SDL3_0.0.0 {
SDL_GetScancodeName; SDL_GetScancodeName;
SDL_GetSemaphoreValue; SDL_GetSemaphoreValue;
SDL_GetSensorData; SDL_GetSensorData;
SDL_GetSensorFromInstanceID; SDL_GetSensorFromID;
SDL_GetSensorID; SDL_GetSensorID;
SDL_GetSensorName; SDL_GetSensorName;
SDL_GetSensorNameFromID; SDL_GetSensorNameFromID;

View file

@ -265,7 +265,7 @@
#define SDL_GetGamepadButtonLabelForType SDL_GetGamepadButtonLabelForType_REAL #define SDL_GetGamepadButtonLabelForType SDL_GetGamepadButtonLabelForType_REAL
#define SDL_GetGamepadConnectionState SDL_GetGamepadConnectionState_REAL #define SDL_GetGamepadConnectionState SDL_GetGamepadConnectionState_REAL
#define SDL_GetGamepadFirmwareVersion SDL_GetGamepadFirmwareVersion_REAL #define SDL_GetGamepadFirmwareVersion SDL_GetGamepadFirmwareVersion_REAL
#define SDL_GetGamepadFromInstanceID SDL_GetGamepadFromInstanceID_REAL #define SDL_GetGamepadFromID SDL_GetGamepadFromID_REAL
#define SDL_GetGamepadFromPlayerIndex SDL_GetGamepadFromPlayerIndex_REAL #define SDL_GetGamepadFromPlayerIndex SDL_GetGamepadFromPlayerIndex_REAL
#define SDL_GetGamepadGUIDFromID SDL_GetGamepadGUIDFromID_REAL #define SDL_GetGamepadGUIDFromID SDL_GetGamepadGUIDFromID_REAL
#define SDL_GetGamepadID SDL_GetGamepadID_REAL #define SDL_GetGamepadID SDL_GetGamepadID_REAL
@ -305,7 +305,7 @@
#define SDL_GetGrabbedWindow SDL_GetGrabbedWindow_REAL #define SDL_GetGrabbedWindow SDL_GetGrabbedWindow_REAL
#define SDL_GetHapticEffectStatus SDL_GetHapticEffectStatus_REAL #define SDL_GetHapticEffectStatus SDL_GetHapticEffectStatus_REAL
#define SDL_GetHapticFeatures SDL_GetHapticFeatures_REAL #define SDL_GetHapticFeatures SDL_GetHapticFeatures_REAL
#define SDL_GetHapticFromInstanceID SDL_GetHapticFromInstanceID_REAL #define SDL_GetHapticFromID SDL_GetHapticFromID_REAL
#define SDL_GetHapticID SDL_GetHapticID_REAL #define SDL_GetHapticID SDL_GetHapticID_REAL
#define SDL_GetHapticName SDL_GetHapticName_REAL #define SDL_GetHapticName SDL_GetHapticName_REAL
#define SDL_GetHapticNameFromID SDL_GetHapticNameFromID_REAL #define SDL_GetHapticNameFromID SDL_GetHapticNameFromID_REAL
@ -321,7 +321,7 @@
#define SDL_GetJoystickButton SDL_GetJoystickButton_REAL #define SDL_GetJoystickButton SDL_GetJoystickButton_REAL
#define SDL_GetJoystickConnectionState SDL_GetJoystickConnectionState_REAL #define SDL_GetJoystickConnectionState SDL_GetJoystickConnectionState_REAL
#define SDL_GetJoystickFirmwareVersion SDL_GetJoystickFirmwareVersion_REAL #define SDL_GetJoystickFirmwareVersion SDL_GetJoystickFirmwareVersion_REAL
#define SDL_GetJoystickFromInstanceID SDL_GetJoystickFromInstanceID_REAL #define SDL_GetJoystickFromID SDL_GetJoystickFromID_REAL
#define SDL_GetJoystickFromPlayerIndex SDL_GetJoystickFromPlayerIndex_REAL #define SDL_GetJoystickFromPlayerIndex SDL_GetJoystickFromPlayerIndex_REAL
#define SDL_GetJoystickGUID SDL_GetJoystickGUID_REAL #define SDL_GetJoystickGUID SDL_GetJoystickGUID_REAL
#define SDL_GetJoystickGUIDFromID SDL_GetJoystickGUIDFromID_REAL #define SDL_GetJoystickGUIDFromID SDL_GetJoystickGUIDFromID_REAL
@ -404,7 +404,7 @@
#define SDL_GetPropertyType SDL_GetPropertyType_REAL #define SDL_GetPropertyType SDL_GetPropertyType_REAL
#define SDL_GetRGB SDL_GetRGB_REAL #define SDL_GetRGB SDL_GetRGB_REAL
#define SDL_GetRGBA SDL_GetRGBA_REAL #define SDL_GetRGBA SDL_GetRGBA_REAL
#define SDL_GetRealGamepadInstanceType SDL_GetRealGamepadInstanceType_REAL #define SDL_GetRealGamepadTypeFromID SDL_GetRealGamepadTypeFromID_REAL
#define SDL_GetRealGamepadType SDL_GetRealGamepadType_REAL #define SDL_GetRealGamepadType SDL_GetRealGamepadType_REAL
#define SDL_GetRectAndLineIntersection SDL_GetRectAndLineIntersection_REAL #define SDL_GetRectAndLineIntersection SDL_GetRectAndLineIntersection_REAL
#define SDL_GetRectAndLineIntersectionFloat SDL_GetRectAndLineIntersectionFloat_REAL #define SDL_GetRectAndLineIntersectionFloat SDL_GetRectAndLineIntersectionFloat_REAL
@ -443,7 +443,7 @@
#define SDL_GetScancodeName SDL_GetScancodeName_REAL #define SDL_GetScancodeName SDL_GetScancodeName_REAL
#define SDL_GetSemaphoreValue SDL_GetSemaphoreValue_REAL #define SDL_GetSemaphoreValue SDL_GetSemaphoreValue_REAL
#define SDL_GetSensorData SDL_GetSensorData_REAL #define SDL_GetSensorData SDL_GetSensorData_REAL
#define SDL_GetSensorFromInstanceID SDL_GetSensorFromInstanceID_REAL #define SDL_GetSensorFromID SDL_GetSensorFromID_REAL
#define SDL_GetSensorID SDL_GetSensorID_REAL #define SDL_GetSensorID SDL_GetSensorID_REAL
#define SDL_GetSensorName SDL_GetSensorName_REAL #define SDL_GetSensorName SDL_GetSensorName_REAL
#define SDL_GetSensorNameFromID SDL_GetSensorNameFromID_REAL #define SDL_GetSensorNameFromID SDL_GetSensorNameFromID_REAL

View file

@ -285,7 +285,7 @@ SDL_DYNAPI_PROC(SDL_GamepadButtonLabel,SDL_GetGamepadButtonLabel,(SDL_Gamepad *a
SDL_DYNAPI_PROC(SDL_GamepadButtonLabel,SDL_GetGamepadButtonLabelForType,(SDL_GamepadType a, SDL_GamepadButton b),(a,b),return) SDL_DYNAPI_PROC(SDL_GamepadButtonLabel,SDL_GetGamepadButtonLabelForType,(SDL_GamepadType a, SDL_GamepadButton b),(a,b),return)
SDL_DYNAPI_PROC(SDL_JoystickConnectionState,SDL_GetGamepadConnectionState,(SDL_Gamepad *a),(a),return) SDL_DYNAPI_PROC(SDL_JoystickConnectionState,SDL_GetGamepadConnectionState,(SDL_Gamepad *a),(a),return)
SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadFirmwareVersion,(SDL_Gamepad *a),(a),return) SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadFirmwareVersion,(SDL_Gamepad *a),(a),return)
SDL_DYNAPI_PROC(SDL_Gamepad*,SDL_GetGamepadFromInstanceID,(SDL_JoystickID 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_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_GetGamepadGUIDFromID,(SDL_JoystickID a),(a),return)
SDL_DYNAPI_PROC(SDL_JoystickID,SDL_GetGamepadID,(SDL_Gamepad *a),(a),return) SDL_DYNAPI_PROC(SDL_JoystickID,SDL_GetGamepadID,(SDL_Gamepad *a),(a),return)
@ -325,7 +325,7 @@ SDL_DYNAPI_PROC(SDL_PropertiesID,SDL_GetGlobalProperties,(void),(),return)
SDL_DYNAPI_PROC(SDL_Window*,SDL_GetGrabbedWindow,(void),(),return) SDL_DYNAPI_PROC(SDL_Window*,SDL_GetGrabbedWindow,(void),(),return)
SDL_DYNAPI_PROC(int,SDL_GetHapticEffectStatus,(SDL_Haptic *a, int b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_GetHapticEffectStatus,(SDL_Haptic *a, int b),(a,b),return)
SDL_DYNAPI_PROC(Uint32,SDL_GetHapticFeatures,(SDL_Haptic *a),(a),return) SDL_DYNAPI_PROC(Uint32,SDL_GetHapticFeatures,(SDL_Haptic *a),(a),return)
SDL_DYNAPI_PROC(SDL_Haptic*,SDL_GetHapticFromInstanceID,(SDL_HapticID 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(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_GetHapticName,(SDL_Haptic *a),(a),return)
SDL_DYNAPI_PROC(const char*,SDL_GetHapticNameFromID,(SDL_HapticID a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetHapticNameFromID,(SDL_HapticID a),(a),return)
@ -341,7 +341,7 @@ SDL_DYNAPI_PROC(int,SDL_GetJoystickBall,(SDL_Joystick *a, int b, int *c, int *d)
SDL_DYNAPI_PROC(Uint8,SDL_GetJoystickButton,(SDL_Joystick *a, int b),(a,b),return) SDL_DYNAPI_PROC(Uint8,SDL_GetJoystickButton,(SDL_Joystick *a, int b),(a,b),return)
SDL_DYNAPI_PROC(SDL_JoystickConnectionState,SDL_GetJoystickConnectionState,(SDL_Joystick *a),(a),return) SDL_DYNAPI_PROC(SDL_JoystickConnectionState,SDL_GetJoystickConnectionState,(SDL_Joystick *a),(a),return)
SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickFirmwareVersion,(SDL_Joystick *a),(a),return) SDL_DYNAPI_PROC(Uint16,SDL_GetJoystickFirmwareVersion,(SDL_Joystick *a),(a),return)
SDL_DYNAPI_PROC(SDL_Joystick*,SDL_GetJoystickFromInstanceID,(SDL_JoystickID a),(a),return) 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_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_GetJoystickGUID,(SDL_Joystick *a),(a),return)
SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_GetJoystickGUIDFromID,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_JoystickGUID,SDL_GetJoystickGUIDFromID,(SDL_JoystickID a),(a),return)
@ -424,7 +424,7 @@ SDL_DYNAPI_PROC(char*,SDL_GetPrimarySelectionText,(void),(),return)
SDL_DYNAPI_PROC(SDL_PropertyType,SDL_GetPropertyType,(SDL_PropertiesID a, const char *b),(a,b),return) SDL_DYNAPI_PROC(SDL_PropertyType,SDL_GetPropertyType,(SDL_PropertiesID a, const char *b),(a,b),return)
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_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(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_GetRealGamepadInstanceType,(SDL_JoystickID a),(a),return) SDL_DYNAPI_PROC(SDL_GamepadType,SDL_GetRealGamepadTypeFromID,(SDL_JoystickID a),(a),return)
SDL_DYNAPI_PROC(SDL_GamepadType,SDL_GetRealGamepadType,(SDL_Gamepad *a),(a),return) SDL_DYNAPI_PROC(SDL_GamepadType,SDL_GetRealGamepadType,(SDL_Gamepad *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_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_GetRectAndLineIntersectionFloat,(const SDL_FRect *a, float *b, float *c, float *d, float *e),(a,b,c,d,e),return)
@ -463,7 +463,7 @@ SDL_DYNAPI_PROC(SDL_Scancode,SDL_GetScancodeFromName,(const char *a),(a),return)
SDL_DYNAPI_PROC(const char*,SDL_GetScancodeName,(SDL_Scancode a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetScancodeName,(SDL_Scancode a),(a),return)
SDL_DYNAPI_PROC(Uint32,SDL_GetSemaphoreValue,(SDL_Semaphore *a),(a),return) SDL_DYNAPI_PROC(Uint32,SDL_GetSemaphoreValue,(SDL_Semaphore *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_GetSensorData,(SDL_Sensor *a, float *b, int c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_GetSensorData,(SDL_Sensor *a, float *b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_Sensor*,SDL_GetSensorFromInstanceID,(SDL_SensorID a),(a),return) 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(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_GetSensorName,(SDL_Sensor *a),(a),return)
SDL_DYNAPI_PROC(const char*,SDL_GetSensorNameFromID,(SDL_SensorID a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GetSensorNameFromID,(SDL_SensorID a),(a),return)

View file

@ -166,7 +166,7 @@ SDL_Haptic *SDL_OpenHaptic(SDL_HapticID instance_id)
return haptic; return haptic;
} }
SDL_Haptic *SDL_GetHapticFromInstanceID(SDL_HapticID instance_id) SDL_Haptic *SDL_GetHapticFromID(SDL_HapticID instance_id)
{ {
SDL_Haptic *haptic; SDL_Haptic *haptic;

View file

@ -558,7 +558,7 @@ static void PopMappingChangeTracking(void)
for (i = 0; tracker->joysticks[i]; ++i) { for (i = 0; tracker->joysticks[i]; ++i) {
/* Looking up the new mapping might create one and associate it with the gamepad (and generate events) */ /* Looking up the new mapping might create one and associate it with the gamepad (and generate events) */
SDL_JoystickID joystick = tracker->joysticks[i]; SDL_JoystickID joystick = tracker->joysticks[i];
SDL_Gamepad *gamepad = SDL_GetGamepadFromInstanceID(joystick); SDL_Gamepad *gamepad = SDL_GetGamepadFromID(joystick);
GamepadMapping_t *new_mapping = SDL_PrivateGetGamepadMapping(joystick, SDL_FALSE); GamepadMapping_t *new_mapping = SDL_PrivateGetGamepadMapping(joystick, SDL_FALSE);
GamepadMapping_t *old_mapping = gamepad ? gamepad->mapping : tracker->joystick_mappings[i]; GamepadMapping_t *old_mapping = gamepad ? gamepad->mapping : tracker->joystick_mappings[i];
@ -1324,7 +1324,7 @@ static void SDL_UpdateGamepadType(SDL_Gamepad *gamepad)
} }
} }
if (gamepad->type == SDL_GAMEPAD_TYPE_UNKNOWN) { if (gamepad->type == SDL_GAMEPAD_TYPE_UNKNOWN) {
gamepad->type = SDL_GetRealGamepadInstanceType(gamepad->joystick->instance_id); gamepad->type = SDL_GetRealGamepadTypeFromID(gamepad->joystick->instance_id);
} }
} }
@ -2497,10 +2497,10 @@ SDL_GamepadType SDL_GetGamepadTypeFromID(SDL_JoystickID instance_id)
if (type != SDL_GAMEPAD_TYPE_UNKNOWN) { if (type != SDL_GAMEPAD_TYPE_UNKNOWN) {
return type; return type;
} }
return SDL_GetRealGamepadInstanceType(instance_id); return SDL_GetRealGamepadTypeFromID(instance_id);
} }
SDL_GamepadType SDL_GetRealGamepadInstanceType(SDL_JoystickID instance_id) SDL_GamepadType SDL_GetRealGamepadTypeFromID(SDL_JoystickID instance_id)
{ {
SDL_GamepadType type = SDL_GAMEPAD_TYPE_UNKNOWN; SDL_GamepadType type = SDL_GAMEPAD_TYPE_UNKNOWN;
const SDL_SteamVirtualGamepadInfo *info; const SDL_SteamVirtualGamepadInfo *info;
@ -3506,7 +3506,7 @@ SDL_Joystick *SDL_GetGamepadJoystick(SDL_Gamepad *gamepad)
/* /*
* Return the SDL_Gamepad associated with an instance id. * Return the SDL_Gamepad associated with an instance id.
*/ */
SDL_Gamepad *SDL_GetGamepadFromInstanceID(SDL_JoystickID joyid) SDL_Gamepad *SDL_GetGamepadFromID(SDL_JoystickID joyid)
{ {
SDL_Gamepad *gamepad; SDL_Gamepad *gamepad;
@ -3534,7 +3534,7 @@ SDL_Gamepad *SDL_GetGamepadFromPlayerIndex(int player_index)
{ {
SDL_Joystick *joystick = SDL_GetJoystickFromPlayerIndex(player_index); SDL_Joystick *joystick = SDL_GetJoystickFromPlayerIndex(player_index);
if (joystick) { if (joystick) {
retval = SDL_GetGamepadFromInstanceID(joystick->instance_id); retval = SDL_GetGamepadFromID(joystick->instance_id);
} }
} }
SDL_UnlockJoysticks(); SDL_UnlockJoysticks();

View file

@ -1585,7 +1585,7 @@ SDL_JoystickID SDL_GetJoystickID(SDL_Joystick *joystick)
/* /*
* Return the SDL_Joystick associated with an instance id. * Return the SDL_Joystick associated with an instance id.
*/ */
SDL_Joystick *SDL_GetJoystickFromInstanceID(SDL_JoystickID instance_id) SDL_Joystick *SDL_GetJoystickFromID(SDL_JoystickID instance_id)
{ {
SDL_Joystick *joystick; SDL_Joystick *joystick;

View file

@ -220,7 +220,7 @@ static void HIDAPI_DriverGameCube_HandleJoystickPacket(SDL_HIDAPI_Device *device
return; /* How do we handle this packet? */ return; /* How do we handle this packet? */
} }
joystick = SDL_GetJoystickFromInstanceID(ctx->joysticks[i]); joystick = SDL_GetJoystickFromID(ctx->joysticks[i]);
if (!joystick) { if (!joystick) {
/* Hasn't been opened yet, skip */ /* Hasn't been opened yet, skip */
return; return;
@ -295,7 +295,7 @@ static void HIDAPI_DriverGameCube_HandleNintendoPacket(SDL_HIDAPI_Device *device
ResetAxisRange(ctx, i); ResetAxisRange(ctx, i);
HIDAPI_JoystickConnected(device, &ctx->joysticks[i]); HIDAPI_JoystickConnected(device, &ctx->joysticks[i]);
} }
joystick = SDL_GetJoystickFromInstanceID(ctx->joysticks[i]); joystick = SDL_GetJoystickFromID(ctx->joysticks[i]);
/* Hasn't been opened yet, skip */ /* Hasn't been opened yet, skip */
if (!joystick) { if (!joystick) {

View file

@ -356,7 +356,7 @@ static SDL_bool HIDAPI_DriverLuna_UpdateDevice(SDL_HIDAPI_Device *device)
int size = 0; int size = 0;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} else { } else {
return SDL_FALSE; return SDL_FALSE;
} }

View file

@ -520,7 +520,7 @@ static SDL_bool HIDAPI_DriverPS3_UpdateDevice(SDL_HIDAPI_Device *device)
int size; int size;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} else { } else {
return SDL_FALSE; return SDL_FALSE;
} }
@ -958,7 +958,7 @@ static SDL_bool HIDAPI_DriverPS3ThirdParty_UpdateDevice(SDL_HIDAPI_Device *devic
int size; int size;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} else { } else {
return SDL_FALSE; return SDL_FALSE;
} }
@ -1297,7 +1297,7 @@ static SDL_bool HIDAPI_DriverPS3SonySixaxis_UpdateDevice(SDL_HIDAPI_Device *devi
int size; int size;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} else { } else {
return SDL_FALSE; return SDL_FALSE;
} }

View file

@ -1256,7 +1256,7 @@ static SDL_bool HIDAPI_DriverPS4_UpdateDevice(SDL_HIDAPI_Device *device)
Uint64 now = SDL_GetTicks(); Uint64 now = SDL_GetTicks();
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} }
while ((size = SDL_hid_read_timeout(device->dev, data, sizeof(data), 0)) > 0) { while ((size = SDL_hid_read_timeout(device->dev, data, sizeof(data), 0)) > 0) {

View file

@ -1492,7 +1492,7 @@ static SDL_bool HIDAPI_DriverPS5_UpdateDevice(SDL_HIDAPI_Device *device)
Uint64 now = SDL_GetTicks(); Uint64 now = SDL_GetTicks();
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} }
while ((size = SDL_hid_read_timeout(device->dev, data, sizeof(data), 0)) > 0) { while ((size = SDL_hid_read_timeout(device->dev, data, sizeof(data), 0)) > 0) {

View file

@ -471,7 +471,7 @@ static SDL_bool HIDAPI_DriverShield_UpdateDevice(SDL_HIDAPI_Device *device)
ShieldCommandReport_t *cmd_resp_report; ShieldCommandReport_t *cmd_resp_report;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} else { } else {
return SDL_FALSE; return SDL_FALSE;
} }

View file

@ -266,7 +266,7 @@ static SDL_bool HIDAPI_DriverStadia_UpdateDevice(SDL_HIDAPI_Device *device)
int size = 0; int size = 0;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} else { } else {
return SDL_FALSE; return SDL_FALSE;
} }

View file

@ -1092,7 +1092,7 @@ static SDL_bool HIDAPI_DriverSteam_UpdateDevice(SDL_HIDAPI_Device *device)
SDL_Joystick *joystick = NULL; SDL_Joystick *joystick = NULL;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} else { } else {
return SDL_FALSE; return SDL_FALSE;
} }

View file

@ -317,7 +317,7 @@ static SDL_bool HIDAPI_DriverSteamDeck_UpdateDevice(SDL_HIDAPI_Device *device)
ValveInReport_t *pInReport = (ValveInReport_t *)data; ValveInReport_t *pInReport = (ValveInReport_t *)data;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
if (joystick == NULL) { if (joystick == NULL) {
return SDL_FALSE; return SDL_FALSE;
} }

View file

@ -2562,7 +2562,7 @@ static SDL_bool HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device)
Uint64 now = SDL_GetTicks(); Uint64 now = SDL_GetTicks();
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} }
while ((size = ReadInput(ctx)) > 0) { while ((size = ReadInput(ctx)) > 0) {

View file

@ -1517,7 +1517,7 @@ static SDL_bool HIDAPI_DriverWii_UpdateDevice(SDL_HIDAPI_Device *device)
Uint64 now; Uint64 now;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} else { } else {
return SDL_FALSE; return SDL_FALSE;
} }

View file

@ -337,7 +337,7 @@ static SDL_bool HIDAPI_DriverXbox360_UpdateDevice(SDL_HIDAPI_Device *device)
int size = 0; int size = 0;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} else { } else {
return SDL_FALSE; return SDL_FALSE;
} }

View file

@ -294,7 +294,7 @@ static SDL_bool HIDAPI_DriverXbox360W_UpdateDevice(SDL_HIDAPI_Device *device)
int size; int size;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} }
while ((size = SDL_hid_read_timeout(device->dev, data, sizeof(data), 0)) > 0) { while ((size = SDL_hid_read_timeout(device->dev, data, sizeof(data), 0)) > 0) {

View file

@ -1574,7 +1574,7 @@ static SDL_bool HIDAPI_DriverXboxOne_UpdateDevice(SDL_HIDAPI_Device *device)
int size; int size;
if (device->num_joysticks > 0) { if (device->num_joysticks > 0) {
joystick = SDL_GetJoystickFromInstanceID(device->joysticks[0]); joystick = SDL_GetJoystickFromID(device->joysticks[0]);
} else { } else {
return SDL_FALSE; return SDL_FALSE;
} }

View file

@ -679,7 +679,7 @@ static void HIDAPI_UpdateJoystickSerial(SDL_HIDAPI_Device *device)
SDL_AssertJoysticksLocked(); SDL_AssertJoysticksLocked();
for (i = 0; i < device->num_joysticks; ++i) { for (i = 0; i < device->num_joysticks; ++i) {
SDL_Joystick *joystick = SDL_GetJoystickFromInstanceID(device->joysticks[i]); SDL_Joystick *joystick = SDL_GetJoystickFromID(device->joysticks[i]);
if (joystick && device->serial) { if (joystick && device->serial) {
SDL_free(joystick->serial); SDL_free(joystick->serial);
joystick->serial = SDL_strdup(device->serial); joystick->serial = SDL_strdup(device->serial);
@ -834,7 +834,7 @@ void HIDAPI_JoystickDisconnected(SDL_HIDAPI_Device *device, SDL_JoystickID joyst
for (i = 0; i < device->num_joysticks; ++i) { for (i = 0; i < device->num_joysticks; ++i) {
if (device->joysticks[i] == joystickID) { if (device->joysticks[i] == joystickID) {
SDL_Joystick *joystick = SDL_GetJoystickFromInstanceID(joystickID); SDL_Joystick *joystick = SDL_GetJoystickFromID(joystickID);
if (joystick) { if (joystick) {
HIDAPI_JoystickClose(joystick); HIDAPI_JoystickClose(joystick);
} }
@ -899,7 +899,7 @@ void HIDAPI_UpdateDeviceProperties(SDL_HIDAPI_Device *device)
SDL_LockJoysticks(); SDL_LockJoysticks();
for (i = 0; i < device->num_joysticks; ++i) { for (i = 0; i < device->num_joysticks; ++i) {
SDL_Joystick *joystick = SDL_GetJoystickFromInstanceID(device->joysticks[i]); SDL_Joystick *joystick = SDL_GetJoystickFromID(device->joysticks[i]);
if (joystick) { if (joystick) {
HIDAPI_UpdateJoystickProperties(device, joystick); HIDAPI_UpdateJoystickProperties(device, joystick);
} }

View file

@ -361,7 +361,7 @@ SDL_Sensor *SDL_OpenSensor(SDL_SensorID instance_id)
/* /*
* Find the SDL_Sensor that owns this instance id * Find the SDL_Sensor that owns this instance id
*/ */
SDL_Sensor *SDL_GetSensorFromInstanceID(SDL_SensorID instance_id) SDL_Sensor *SDL_GetSensorFromID(SDL_SensorID instance_id)
{ {
SDL_Sensor *sensor; SDL_Sensor *sensor;

View file

@ -37,7 +37,7 @@ static const char *GetSensorTypeString(SDL_SensorType type)
static void HandleSensorEvent(SDL_SensorEvent *event) static void HandleSensorEvent(SDL_SensorEvent *event)
{ {
SDL_Sensor *sensor = SDL_GetSensorFromInstanceID(event->which); SDL_Sensor *sensor = SDL_GetSensorFromID(event->which);
if (!sensor) { if (!sensor) {
SDL_Log("Couldn't get sensor for sensor event\n"); SDL_Log("Couldn't get sensor for sensor event\n");
return; return;