From a06a593aa670e7182f1e7cdc9da5fc181bc2b61a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 24 Jan 2023 13:47:30 -0800
Subject: [PATCH] Renamed SDL_GetGamepadNumTouchpads and
SDL_GetGamepadNumTouchpadFingers to match the new convention
---
docs/README-migration.md | 4 ++--
include/SDL3/SDL_gamepad.h | 4 ++--
include/SDL3/SDL_oldnames.h | 8 ++++----
src/dynapi/SDL_dynapi.sym | 4 ++--
src/dynapi/SDL_dynapi_overrides.h | 4 ++--
src/dynapi/SDL_dynapi_procs.h | 4 ++--
src/joystick/SDL_gamepad.c | 4 ++--
7 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/docs/README-migration.md b/docs/README-migration.md
index a7c8cc2bcd62..9ea52ee47766 100644
--- a/docs/README-migration.md
+++ b/docs/README-migration.md
@@ -230,8 +230,8 @@ The following functions have been renamed:
* SDL_GameControllerGetButtonFromString() => SDL_GetGamepadButtonFromString()
* SDL_GameControllerGetFirmwareVersion() => SDL_GetGamepadFirmwareVersion()
* SDL_GameControllerGetJoystick() => SDL_GetGamepadJoystick()
-* SDL_GameControllerGetNumTouchpadFingers() => SDL_GetGamepadNumTouchpadFingers()
-* SDL_GameControllerGetNumTouchpads() => SDL_GetGamepadNumTouchpads()
+* SDL_GameControllerGetNumTouchpadFingers() => SDL_GetNumGamepadTouchpadFingers()
+* SDL_GameControllerGetNumTouchpads() => SDL_GetNumGamepadTouchpads()
* SDL_GameControllerGetPlayerIndex() => SDL_GetGamepadPlayerIndex()
* SDL_GameControllerGetProduct() => SDL_GetGamepadProduct()
* SDL_GameControllerGetProductVersion() => SDL_GetGamepadProductVersion()
diff --git a/include/SDL3/SDL_gamepad.h b/include/SDL3/SDL_gamepad.h
index a5d5bb3ba162..b03ebfbc79c3 100644
--- a/include/SDL3/SDL_gamepad.h
+++ b/include/SDL3/SDL_gamepad.h
@@ -844,7 +844,7 @@ extern DECLSPEC Uint8 SDLCALL SDL_GetGamepadButton(SDL_Gamepad *gamepad, SDL_Gam
*
* \since This function is available since SDL 3.0.0.
*/
-extern DECLSPEC int SDLCALL SDL_GetGamepadNumTouchpads(SDL_Gamepad *gamepad);
+extern DECLSPEC int SDLCALL SDL_GetNumGamepadTouchpads(SDL_Gamepad *gamepad);
/**
* Get the number of supported simultaneous fingers on a touchpad on a game
@@ -852,7 +852,7 @@ extern DECLSPEC int SDLCALL SDL_GetGamepadNumTouchpads(SDL_Gamepad *gamepad);
*
* \since This function is available since SDL 3.0.0.
*/
-extern DECLSPEC int SDLCALL SDL_GetGamepadNumTouchpadFingers(SDL_Gamepad *gamepad, int touchpad);
+extern DECLSPEC int SDLCALL SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad *gamepad, int touchpad);
/**
* Get the current state of a finger on a touchpad on a gamepad.
diff --git a/include/SDL3/SDL_oldnames.h b/include/SDL3/SDL_oldnames.h
index 1cf6c6098dd8..c29be7bd17db 100644
--- a/include/SDL3/SDL_oldnames.h
+++ b/include/SDL3/SDL_oldnames.h
@@ -203,8 +203,8 @@
#define SDL_GameControllerGetButtonFromString SDL_GetGamepadButtonFromString
#define SDL_GameControllerGetFirmwareVersion SDL_GetGamepadFirmwareVersion
#define SDL_GameControllerGetJoystick SDL_GetGamepadJoystick
-#define SDL_GameControllerGetNumTouchpadFingers SDL_GetGamepadNumTouchpadFingers
-#define SDL_GameControllerGetNumTouchpads SDL_GetGamepadNumTouchpads
+#define SDL_GameControllerGetNumTouchpadFingers SDL_GetNumGamepadTouchpadFingers
+#define SDL_GameControllerGetNumTouchpads SDL_GetNumGamepadTouchpads
#define SDL_GameControllerGetPlayerIndex SDL_GetGamepadPlayerIndex
#define SDL_GameControllerGetProduct SDL_GetGamepadProduct
#define SDL_GameControllerGetProductVersion SDL_GetGamepadProductVersion
@@ -581,8 +581,8 @@
#define SDL_GameControllerGetButtonFromString SDL_GameControllerGetButtonFromString_renamed_SDL_GetGamepadButtonFromString
#define SDL_GameControllerGetFirmwareVersion SDL_GameControllerGetFirmwareVersion_renamed_SDL_GetGamepadFirmwareVersion
#define SDL_GameControllerGetJoystick SDL_GameControllerGetJoystick_renamed_SDL_GetGamepadJoystick
-#define SDL_GameControllerGetNumTouchpadFingers SDL_GameControllerGetNumTouchpadFingers_renamed_SDL_GetGamepadNumTouchpadFingers
-#define SDL_GameControllerGetNumTouchpads SDL_GameControllerGetNumTouchpads_renamed_SDL_GetGamepadNumTouchpads
+#define SDL_GameControllerGetNumTouchpadFingers SDL_GameControllerGetNumTouchpadFingers_renamed_SDL_GetNumGamepadTouchpadFingers
+#define SDL_GameControllerGetNumTouchpads SDL_GameControllerGetNumTouchpads_renamed_SDL_GetNumGamepadTouchpads
#define SDL_GameControllerGetPlayerIndex SDL_GameControllerGetPlayerIndex_renamed_SDL_GetGamepadPlayerIndex
#define SDL_GameControllerGetProduct SDL_GameControllerGetProduct_renamed_SDL_GetGamepadProduct
#define SDL_GameControllerGetProductVersion SDL_GameControllerGetProductVersion_renamed_SDL_GetGamepadProductVersion
diff --git a/src/dynapi/SDL_dynapi.sym b/src/dynapi/SDL_dynapi.sym
index 74e6d25ef24a..ab6566fb911e 100644
--- a/src/dynapi/SDL_dynapi.sym
+++ b/src/dynapi/SDL_dynapi.sym
@@ -199,8 +199,8 @@ SDL3_0.0.0 {
SDL_GetGamepadMappingForGUID;
SDL_GetGamepadMappingForIndex;
SDL_GetGamepadName;
- SDL_GetGamepadNumTouchpadFingers;
- SDL_GetGamepadNumTouchpads;
+ SDL_GetNumGamepadTouchpadFingers;
+ SDL_GetNumGamepadTouchpads;
SDL_GetGamepadPath;
SDL_GetGamepadPlayerIndex;
SDL_GetGamepadProduct;
diff --git a/src/dynapi/SDL_dynapi_overrides.h b/src/dynapi/SDL_dynapi_overrides.h
index 5c82e562dafe..83a4386eb733 100644
--- a/src/dynapi/SDL_dynapi_overrides.h
+++ b/src/dynapi/SDL_dynapi_overrides.h
@@ -224,8 +224,8 @@
#define SDL_GetGamepadMappingForGUID SDL_GetGamepadMappingForGUID_REAL
#define SDL_GetGamepadMappingForIndex SDL_GetGamepadMappingForIndex_REAL
#define SDL_GetGamepadName SDL_GetGamepadName_REAL
-#define SDL_GetGamepadNumTouchpadFingers SDL_GetGamepadNumTouchpadFingers_REAL
-#define SDL_GetGamepadNumTouchpads SDL_GetGamepadNumTouchpads_REAL
+#define SDL_GetNumGamepadTouchpadFingers SDL_GetGamepadNumTouchpadFingers_REAL
+#define SDL_GetNumGamepadTouchpads SDL_GetGamepadNumTouchpads_REAL
#define SDL_GetGamepadPath SDL_GetGamepadPath_REAL
#define SDL_GetGamepadPlayerIndex SDL_GetGamepadPlayerIndex_REAL
#define SDL_GetGamepadProduct SDL_GetGamepadProduct_REAL
diff --git a/src/dynapi/SDL_dynapi_procs.h b/src/dynapi/SDL_dynapi_procs.h
index 2128ef2c3b00..be71c09f39f2 100644
--- a/src/dynapi/SDL_dynapi_procs.h
+++ b/src/dynapi/SDL_dynapi_procs.h
@@ -298,8 +298,8 @@ 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_GetGamepadMappingForIndex,(int a),(a),return)
SDL_DYNAPI_PROC(const char*,SDL_GetGamepadName,(SDL_Gamepad *a),(a),return)
-SDL_DYNAPI_PROC(int,SDL_GetGamepadNumTouchpadFingers,(SDL_Gamepad *a, int b),(a,b),return)
-SDL_DYNAPI_PROC(int,SDL_GetGamepadNumTouchpads,(SDL_Gamepad *a),(a),return)
+SDL_DYNAPI_PROC(int,SDL_GetNumGamepadTouchpadFingers,(SDL_Gamepad *a, int b),(a,b),return)
+SDL_DYNAPI_PROC(int,SDL_GetNumGamepadTouchpads,(SDL_Gamepad *a),(a),return)
SDL_DYNAPI_PROC(const char*,SDL_GetGamepadPath,(SDL_Gamepad *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_GetGamepadPlayerIndex,(SDL_Gamepad *a),(a),return)
SDL_DYNAPI_PROC(Uint16,SDL_GetGamepadProduct,(SDL_Gamepad *a),(a),return)
diff --git a/src/joystick/SDL_gamepad.c b/src/joystick/SDL_gamepad.c
index cca80cee0e6b..10b5cf4c8a1a 100644
--- a/src/joystick/SDL_gamepad.c
+++ b/src/joystick/SDL_gamepad.c
@@ -2396,7 +2396,7 @@ Uint8 SDL_GetGamepadButton(SDL_Gamepad *gamepad, SDL_GamepadButton button)
/**
* Get the number of touchpads on a gamepad.
*/
-int SDL_GetGamepadNumTouchpads(SDL_Gamepad *gamepad)
+int SDL_GetNumGamepadTouchpads(SDL_Gamepad *gamepad)
{
int retval = 0;
@@ -2415,7 +2415,7 @@ int SDL_GetGamepadNumTouchpads(SDL_Gamepad *gamepad)
/**
* Get the number of supported simultaneous fingers on a touchpad on a gamepad.
*/
-int SDL_GetGamepadNumTouchpadFingers(SDL_Gamepad *gamepad, int touchpad)
+int SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad *gamepad, int touchpad)
{
int retval = 0;