SDL: SDL API renaming: SDL_gamecontroller.h

From 659abc721aa47115c55183424cec660fcdc056e8 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 27 Dec 2022 09:46:24 -0800
Subject: [PATCH] SDL API renaming: SDL_gamecontroller.h

SDL_gamecontroller.h has been renamed SDL_gamepad.h, and all APIs have been renamed to match.

Fixes https://github.com/libsdl-org/SDL/issues/6885
---
 .gitignore                                    |   20 +-
 VisualC-GDK/SDL.sln                           |    2 +-
 VisualC-GDK/SDL/SDL.vcxproj                   |    6 +-
 VisualC-GDK/SDL/SDL.vcxproj.filters           |    6 +-
 .../PackageLayout.xml                         |    2 +-
 .../testgamepad.vcxproj}                      |   20 +-
 .../testgamepad.vcxproj.filters}              |    6 +-
 .../wingdk/MicrosoftGame.config               |    6 +-
 .../xboxone/MicrosoftGame.config              |    6 +-
 .../xboxseries/MicrosoftGame.config           |    6 +-
 VisualC-WinRT/SDL-UWP.vcxproj                 |    4 +-
 VisualC-WinRT/SDL-UWP.vcxproj.filters         |    4 +-
 VisualC/SDL.sln                               |    4 +-
 VisualC/SDL/SDL.vcxproj                       |    6 +-
 VisualC/SDL/SDL.vcxproj.filters               |    6 +-
 .../gamepadmap.vcxproj}                       |   16 +-
 .../testgamepad.vcxproj}                      |   16 +-
 WhatsNew.txt                                  |  209 +++-
 Xcode/SDL/SDL.xcodeproj/project.pbxproj       |  100 +-
 .../SDLTest/SDLTest.xcodeproj/project.pbxproj |   84 +-
 build-scripts/rename_api.py                   |    4 +-
 docs/README-migration.md                      |  150 ++-
 docs/README-winrt.md                          |    2 +-
 include/SDL3/SDL.h                            |    2 +-
 include/SDL3/SDL_events.h                     |   78 +-
 include/SDL3/SDL_gamecontroller.h             | 1053 -----------------
 include/SDL3/SDL_gamepad.h                    | 1013 ++++++++++++++++
 include/SDL3/SDL_hints.h                      |   16 +-
 include/SDL3/SDL_init.h                       |    6 +-
 include/SDL3/SDL_joystick.h                   |    6 +-
 include/SDL3/SDL_oldnames.h                   |  264 +++++
 src/SDL.c                                     |   20 +-
 src/dynapi/SDL_dynapi.sym                     |  112 +-
 src/dynapi/SDL_dynapi_overrides.h             |  112 +-
 src/dynapi/SDL_dynapi_procs.h                 |  112 +-
 src/events/SDL_events.c                       |   24 +-
 .../{SDL_gamecontroller.c => SDL_gamepad.c}   | 1034 ++++++++--------
 ...DL_gamecontrollerdb.h => SDL_gamepad_db.h} |    0
 src/joystick/SDL_joystick.c                   |  108 +-
 src/joystick/SDL_joystick_c.h                 |   24 +-
 src/joystick/SDL_sysjoystick.h                |    2 +-
 src/joystick/android/SDL_sysjoystick.c        |   76 +-
 src/joystick/apple/SDL_mfijoystick.m          |  154 +--
 src/joystick/check_8bitdo.sh                  |    6 +-
 src/joystick/hidapi/SDL_hidapi_combined.c     |    2 +-
 src/joystick/hidapi/SDL_hidapi_gamecube.c     |   68 +-
 src/joystick/hidapi/SDL_hidapi_luna.c         |   92 +-
 src/joystick/hidapi/SDL_hidapi_ps3.c          |  194 +--
 src/joystick/hidapi/SDL_hidapi_ps4.c          |   50 +-
 src/joystick/hidapi/SDL_hidapi_ps5.c          |   98 +-
 src/joystick/hidapi/SDL_hidapi_shield.c       |  102 +-
 src/joystick/hidapi/SDL_hidapi_stadia.c       |   50 +-
 src/joystick/hidapi/SDL_hidapi_steam.c        |   48 +-
 src/joystick/hidapi/SDL_hidapi_switch.c       |  286 ++---
 src/joystick/hidapi/SDL_hidapi_wii.c          |  172 +--
 src/joystick/hidapi/SDL_hidapi_xbox360.c      |   54 +-
 src/joystick/hidapi/SDL_hidapi_xbox360w.c     |   50 +-
 src/joystick/hidapi/SDL_hidapi_xboxone.c      |  134 +--
 src/joystick/hidapi/SDL_hidapijoystick.c      |   28 +-
 src/joystick/hidapi/SDL_hidapijoystick_c.h    |    8 +-
 src/joystick/sort_controllers.py              |    4 +-
 src/joystick/virtual/SDL_virtualjoystick.c    |   64 +-
 src/joystick/windows/SDL_dinputjoystick.c     |    8 +-
 src/joystick/windows/SDL_rawinputjoystick.c   |   94 +-
 src/test/SDL_test_common.c                    |   20 +-
 test/CMakeLists.txt                           |    4 +-
 test/README                                   |    2 +-
 test/{controllermap.bmp => gamepadmap.bmp}    |  Bin
 test/{controllermap.c => gamepadmap.c}        |  284 ++---
 ...rollermap_back.bmp => gamepadmap_back.bmp} |  Bin
 test/testautomation_joystick.c                |   16 +-
 test/testautomation_main.c                    |   12 +-
 test/{testgamecontroller.c => testgamepad.c}  |  432 +++----
 73 files changed, 3891 insertions(+), 3392 deletions(-)
 rename VisualC-GDK/tests/{testgamecontroller => testgamepad}/PackageLayout.xml (95%)
 rename VisualC-GDK/tests/{testgamecontroller/testgamecontroller.vcxproj => testgamepad/testgamepad.vcxproj} (97%)
 rename VisualC-GDK/tests/{testgamecontroller/testgamecontroller.vcxproj.filters => testgamepad/testgamepad.vcxproj.filters} (90%)
 rename VisualC-GDK/tests/{testgamecontroller => testgamepad}/wingdk/MicrosoftGame.config (84%)
 rename VisualC-GDK/tests/{testgamecontroller => testgamepad}/xboxone/MicrosoftGame.config (83%)
 rename VisualC-GDK/tests/{testgamecontroller => testgamepad}/xboxseries/MicrosoftGame.config (83%)
 rename VisualC/tests/{controllermap/controllermap.vcxproj => gamepadmap/gamepadmap.vcxproj} (95%)
 rename VisualC/tests/{testgamecontroller/testgamecontroller.vcxproj => testgamepad/testgamepad.vcxproj} (95%)
 delete mode 100644 include/SDL3/SDL_gamecontroller.h
 create mode 100644 include/SDL3/SDL_gamepad.h
 rename src/joystick/{SDL_gamecontroller.c => SDL_gamepad.c} (68%)
 rename src/joystick/{SDL_gamecontrollerdb.h => SDL_gamepad_db.h} (100%)
 rename test/{controllermap.bmp => gamepadmap.bmp} (100%)
 rename test/{controllermap.c => gamepadmap.c} (72%)
 rename test/{controllermap_back.bmp => gamepadmap_back.bmp} (100%)
 rename test/{testgamecontroller.c => testgamepad.c} (61%)

diff --git a/.gitignore b/.gitignore
index 855580e211be..6ef27cfe2623 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,17 +61,17 @@ Release
 *.ncb
 *.suo
 *.sdf
-VisualC/tests/controllermap/axis.bmp
-VisualC/tests/controllermap/button.bmp
-VisualC/tests/controllermap/controllermap.bmp
-VisualC/tests/controllermap/controllermap_back.bmp
+VisualC/tests/gamepadmap/axis.bmp
+VisualC/tests/gamepadmap/button.bmp
+VisualC/tests/gamepadmap/gamepadmap.bmp
+VisualC/tests/gamepadmap/gamepadmap_back.bmp
 VisualC/tests/loopwave/sample.wav
 VisualC/tests/testautomation/CompareSurfaces0001_Reference.bmp
 VisualC/tests/testautomation/CompareSurfaces0001_TestOutput.bmp
-VisualC/tests/testgamecontroller/axis.bmp
-VisualC/tests/testgamecontroller/button.bmp
-VisualC/tests/testgamecontroller/controllermap.bmp
-VisualC/tests/testgamecontroller/controllermap_back.bmp
+VisualC/tests/testgamepad/axis.bmp
+VisualC/tests/testgamepad/button.bmp
+VisualC/tests/testgamepad/gamepadmap.bmp
+VisualC/tests/testgamepad/gamepadmap_back.bmp
 VisualC/tests/testoverlay2/moose.dat
 VisualC/tests/testrendertarget/icon.bmp
 VisualC/tests/testrendertarget/sample.bmp
@@ -87,7 +87,7 @@ android-project/.gradle/
 
 test/checkkeys
 test/checkkeysthreads
-test/controllermap
+test/gamepadmap
 test/loopwave
 test/loopwavequeue
 test/testatomic
@@ -105,7 +105,7 @@ test/testerror
 test/testevdev
 test/testfile
 test/testfilesystem
-test/testgamecontroller
+test/testgamepad
 test/testgeometry
 test/testgesture
 test/testgl2
diff --git a/VisualC-GDK/SDL.sln b/VisualC-GDK/SDL.sln
index 2f6c095b1b4c..f013153e8dfb 100644
--- a/VisualC-GDK/SDL.sln
+++ b/VisualC-GDK/SDL.sln
@@ -10,7 +10,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsp
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3_test", "SDL_test\SDL_test.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08305}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamepad", "tests\testgamepad\testgamepad.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08305}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgdk", "tests\testgdk\testgdk.vcxproj", "{1C9A3F71-35A5-4C56-B292-F4375B3C3649}"
 EndProject
diff --git a/VisualC-GDK/SDL/SDL.vcxproj b/VisualC-GDK/SDL/SDL.vcxproj
index 5db711b5c8ea..f4640c02cd3a 100644
--- a/VisualC-GDK/SDL/SDL.vcxproj
+++ b/VisualC-GDK/SDL/SDL.vcxproj
@@ -304,7 +304,7 @@
     <ClInclude Include="..\..\include\SDL3\SDL_error.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_events.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_filesystem.h" />
-    <ClInclude Include="..\..\include\SDL3\SDL_gamecontroller.h" />
+    <ClInclude Include="..\..\include\SDL3\SDL_gamepad.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_guid.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_haptic.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_hints.h" />
@@ -403,7 +403,7 @@
     <ClInclude Include="..\..\src\joystick\controller_type.h" />
     <ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
     <ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
-    <ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
+    <ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
     <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
     <ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
     <ClInclude Include="..\..\src\joystick\usb_ids.h" />
@@ -622,7 +622,7 @@
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
-    <ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
+    <ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
     <ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
     <ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
     <ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
diff --git a/VisualC-GDK/SDL/SDL.vcxproj.filters b/VisualC-GDK/SDL/SDL.vcxproj.filters
index b678ddd8290b..62aff4c97ad8 100644
--- a/VisualC-GDK/SDL/SDL.vcxproj.filters
+++ b/VisualC-GDK/SDL/SDL.vcxproj.filters
@@ -222,7 +222,7 @@
     <ClInclude Include="..\..\include\SDL3\SDL_filesystem.h">
       <Filter>API Headers</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\include\SDL3\SDL_gamecontroller.h">
+    <ClInclude Include="..\..\include\SDL3\SDL_gamepad.h">
       <Filter>API Headers</Filter>
     </ClInclude>
     <ClInclude Include="..\..\include\SDL3\SDL_guid.h">
@@ -483,7 +483,7 @@
     <ClInclude Include="..\..\src\haptic\SDL_haptic_c.h">
       <Filter>haptic</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h">
+    <ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h">
       <Filter>joystick</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h">
@@ -916,7 +916,7 @@
     <ClCompile Include="..\..\src\joystick\controller_type.c">
       <Filter>joystick</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c">
+    <ClCompile Include="..\..\src\joystick\SDL_gamepad.c">
       <Filter>joystick</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\joystick\SDL_joystick.c">
diff --git a/VisualC-GDK/tests/testgamecontroller/PackageLayout.xml b/VisualC-GDK/tests/testgamepad/PackageLayout.xml
similarity index 95%
rename from VisualC-GDK/tests/testgamecontroller/PackageLayout.xml
rename to VisualC-GDK/tests/testgamepad/PackageLayout.xml
index cda188c7c674..272543b061d2 100644
--- a/VisualC-GDK/tests/testgamecontroller/PackageLayout.xml
+++ b/VisualC-GDK/tests/testgamepad/PackageLayout.xml
@@ -1,6 +1,6 @@
 <Package>
   <Chunk Id="1000" Marker="Launch">
-    <FileGroup DestinationPath="." SourcePath="." Include="testgamecontroller.exe" />
+    <FileGroup DestinationPath="." SourcePath="." Include="testgamepad.exe" />
     <FileGroup DestinationPath="." SourcePath="." Include="MicrosoftGame.config" />
     <FileGroup DestinationPath="." SourcePath="." Include="*.bmp" />
     <FileGroup DestinationPath="." SourcePath="." Include="*.png" />
diff --git a/VisualC-GDK/tests/testgamecontroller/testgamecontroller.vcxproj b/VisualC-GDK/tests/testgamepad/testgamepad.vcxproj
similarity index 97%
rename from VisualC-GDK/tests/testgamecontroller/testgamecontroller.vcxproj
rename to VisualC-GDK/tests/testgamepad/testgamepad.vcxproj
index 2926a4c7fc27..66f3d59b4126 100644
--- a/VisualC-GDK/tests/testgamecontroller/testgamecontroller.vcxproj
+++ b/VisualC-GDK/tests/testgamepad/testgamepad.vcxproj
@@ -28,7 +28,7 @@
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{55812185-D13C-4022-9C81-32E0F4A08305}</ProjectGuid>
-    <RootNamespace>testgamecontroller</RootNamespace>
+    <RootNamespace>testgamepad</RootNamespace>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -124,7 +124,7 @@
       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MkTypLibCompatible>true</MkTypLibCompatible>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TypeLibraryName>.\Release/testgamecontroller.tlb</TypeLibraryName>
+      <TypeLibraryName>.\Release/testgamepad.tlb</TypeLibraryName>
     </Midl>
     <ClCompile>
       <AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -147,7 +147,7 @@
       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MkTypLibCompatible>true</MkTypLibCompatible>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TypeLibraryName>.\Release/testgamecontroller.tlb</TypeLibraryName>
+      <TypeLibraryName>.\Release/testgamepad.tlb</TypeLibraryName>
     </Midl>
     <ClCompile>
       <AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -170,7 +170,7 @@
       <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MkTypLibCompatible>true</MkTypLibCompatible>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TypeLibraryName>.\Release/testgamecontroller.tlb</TypeLibraryName>
+      <TypeLibraryName>.\Release/testgamepad.tlb</TypeLibraryName>
     </Midl>
     <ClCompile>
       <AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -193,7 +193,7 @@
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MkTypLibCompatible>true</MkTypLibCompatible>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TypeLibraryName>.\Debug/testgamecontroller.tlb</TypeLibraryName>
+      <TypeLibraryName>.\Debug/testgamepad.tlb</TypeLibraryName>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
@@ -219,7 +219,7 @@
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MkTypLibCompatible>true</MkTypLibCompatible>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TypeLibraryName>.\Debug/testgamecontroller.tlb</TypeLibraryName>
+      <TypeLibraryName>.\Debug/testgamepad.tlb</TypeLibraryName>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
@@ -245,7 +245,7 @@
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MkTypLibCompatible>true</MkTypLibCompatible>
       <SuppressStartupBanner>true</SuppressStartupBanner>
-      <TypeLibraryName>.\Debug/testgamecontroller.tlb</TypeLibraryName>
+      <TypeLibraryName>.\Debug/testgamepad.tlb</TypeLibraryName>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
@@ -327,7 +327,7 @@
       <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
       <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
     </CopyFileToFolders>
-    <CopyFileToFolders Include="..\..\..\test\controllermap.bmp">
+    <CopyFileToFolders Include="..\..\..\test\gamepadmap.bmp">
       <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">Copying %(Filename)%(Extension)</Message>
       <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">Copying %(Filename)%(Extension)</Message>
       <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">Copying %(Filename)%(Extension)</Message>
@@ -353,7 +353,7 @@
       <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.Scarlett.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
       <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'">$(ProjectDir)\%(Filename)%(Extension);%(Outputs)</Outputs>
     </CopyFileToFolders>
-    <CopyFileToFolders Include="..\..\..\test\controllermap_back.bmp">
+    <CopyFileToFolders Include="..\..\..\test\gamepadmap_back.bmp">
       <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Desktop.x64'">Copying %(Filename)%(Extension)</Message>
       <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.Scarlett.x64'">Copying %(Filename)%(Extension)</Message>
       <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Gaming.Xbox.XboxOne.x64'">Copying %(Filename)%(Extension)</Message>
@@ -381,7 +381,7 @@
     </CopyFileToFolders>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="..\..\..\test\testgamecontroller.c" />
+    <ClCompile Include="..\..\..\test\testgamepad.c" />
     <ClCompile Include="..\..\..\test\testutils.c" />
   </ItemGroup>
   <ItemGroup>
diff --git a/VisualC-GDK/tests/testgamecontroller/testgamecontroller.vcxproj.filters b/VisualC-GDK/tests/testgamepad/testgamepad.vcxproj.filters
similarity index 90%
rename from VisualC-GDK/tests/testgamecontroller/testgamecontroller.vcxproj.filters
rename to VisualC-GDK/tests/testgamepad/testgamepad.vcxproj.filters
index 1124f2c6e605..386270385685 100644
--- a/VisualC-GDK/tests/testgamecontroller/testgamecontroller.vcxproj.filters
+++ b/VisualC-GDK/tests/testgamepad/testgamepad.vcxproj.filters
@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-    <ClCompile Include="..\..\..\test\testgamecontroller.c" />
+    <ClCompile Include="..\..\..\test\testgamepad.c" />
     <ClCompile Include="..\..\..\test\testutils.c" />
   </ItemGroup>
   <ItemGroup>
-    <CopyFileToFolders Include="..\..\..\test\controllermap_back.bmp" />
+    <CopyFileToFolders Include="..\..\..\test\gamepadmap_back.bmp" />
     <CopyFileToFolders Include="..\..\..\test\axis.bmp" />
     <CopyFileToFolders Include="..\..\..\test\button.bmp" />
-    <CopyFileToFolders Include="..\..\..\test\controllermap.bmp" />
+    <CopyFileToFolders Include="..\..\..\test\gamepadmap.bmp" />
     <CopyFileToFolders Include="..\..\logos\Logo44x44.png">
       <Filter>logos</Filter>
     </CopyFileToFolders>
diff --git a/VisualC-GDK/tests/testgamecontroller/wingdk/MicrosoftGame.config b/VisualC-GDK/tests/testgamepad/wingdk/MicrosoftGame.config
similarity index 84%
rename from VisualC-GDK/tests/testgamecontroller/wingdk/MicrosoftGame.config
rename to VisualC-GDK/tests/testgamepad/wingdk/MicrosoftGame.config
index eb4ec4e17135..45adb2682bbd 100644
--- a/VisualC-GDK/tests/testgamecontroller/wingdk/MicrosoftGame.config
+++ b/VisualC-GDK/tests/testgamepad/wingdk/MicrosoftGame.config
@@ -7,7 +7,7 @@
 		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
-		<Executable Name="testgamecontroller.exe"
+		<Executable Name="testgamepad.exe"
 					TargetDeviceFamily="PC"
 					Id="Game" />
 	</ExecutableList>
@@ -22,12 +22,12 @@
 	<MSAAppId>PleaseChangeMe</MSAAppId>
 	<TitleId>FFFFFFFF</TitleId>
 
-	<ShellVisuals DefaultDisplayName="testgamecontroller"
+	<ShellVisuals DefaultDisplayName="testgamepad"
 					PublisherDisplayName="SDL"
 					Square480x480Logo="Logo480x480.png"
 					Square150x150Logo="Logo150x150.png"
 					Square44x44Logo="Logo44x44.png"
-					Description="testgamecontroller"
+					Description="testgamepad"
 					ForegroundText="light"
 					BackgroundColor="#000000"
 					StoreLogo="Logo100x100.png"/>
diff --git a/VisualC-GDK/tests/testgamecontroller/xboxone/MicrosoftGame.config b/VisualC-GDK/tests/testgamepad/xboxone/MicrosoftGame.config
similarity index 83%
rename from VisualC-GDK/tests/testgamecontroller/xboxone/MicrosoftGame.config
rename to VisualC-GDK/tests/testgamepad/xboxone/MicrosoftGame.config
index c18d626d555f..f33e3779e5f8 100644
--- a/VisualC-GDK/tests/testgamecontroller/xboxone/MicrosoftGame.config
+++ b/VisualC-GDK/tests/testgamepad/xboxone/MicrosoftGame.config
@@ -7,7 +7,7 @@
 		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
-		<Executable Name="testgamecontroller.exe"
+		<Executable Name="testgamepad.exe"
 					TargetDeviceFamily="XboxOne"
 					Id="Game" />
 	</ExecutableList>
@@ -16,13 +16,13 @@
 	<MSAAppId>PleaseChangeMe</MSAAppId>
 	<TitleId>FFFFFFFF</TitleId>
 
-	<ShellVisuals DefaultDisplayName="testgamecontroller"
+	<ShellVisuals DefaultDisplayName="testgamepad"
 					PublisherDisplayName="SDL"
 					Square480x480Logo="Logo480x480.png"
 					Square150x150Logo="Logo150x150.png"
 					Square44x44Logo="Logo44x44.png"
 					SplashScreenImage="SplashScreenImage.png"
-					Description="testgamecontroller"
+					Description="testgamepad"
 					ForegroundText="light"
 					BackgroundColor="#000000"
 					StoreLogo="Logo100x100.png"/>
diff --git a/VisualC-GDK/tests/testgamecontroller/xboxseries/MicrosoftGame.config b/VisualC-GDK/tests/testgamepad/xboxseries/MicrosoftGame.config
similarity index 83%
rename from VisualC-GDK/tests/testgamecontroller/xboxseries/MicrosoftGame.config
rename to VisualC-GDK/tests/testgamepad/xboxseries/MicrosoftGame.config
index 53ba05d1e46d..5fa45d436c9d 100644
--- a/VisualC-GDK/tests/testgamecontroller/xboxseries/MicrosoftGame.config
+++ b/VisualC-GDK/tests/testgamepad/xboxseries/MicrosoftGame.config
@@ -7,7 +7,7 @@
 		Publisher="CN=Publisher"/>
 
 	<ExecutableList>
-		<Executable Name="testgamecontroller.exe"
+		<Executable Name="testgamepad.exe"
 					TargetDeviceFamily="Scarlett"
 					Id="Game" />
 	</ExecutableList>
@@ -16,13 +16,13 @@
 	<MSAAppId>PleaseChangeMe</MSAAppId>
 	<TitleId>FFFFFFFF</TitleId>
 
-	<ShellVisuals DefaultDisplayName="testgamecontroller"
+	<ShellVisuals DefaultDisplayName="testgamepad"
 					PublisherDisplayName="SDL"
 					Square480x480Logo="Logo480x480.png"
 					Square150x150Logo="Logo150x150.png"
 					Square44x44Logo="Logo44x44.png"
 					SplashScreenImage="SplashScreenImage.png"
-					Description="testgamecontroller"
+					Description="testgamepad"
 					ForegroundText="light"
 					BackgroundColor="#000000"
 					StoreLogo="Logo100x100.png"/>
diff --git a/VisualC-WinRT/SDL-UWP.vcxproj b/VisualC-WinRT/SDL-UWP.vcxproj
index 3fdbef4fb949..1b49d517f4b2 100644
--- a/VisualC-WinRT/SDL-UWP.vcxproj
+++ b/VisualC-WinRT/SDL-UWP.vcxproj
@@ -121,7 +121,7 @@
     <ClInclude Include="..\src\haptic\windows\SDL_windowshaptic_c.h" />
     <ClInclude Include="..\src\haptic\windows\SDL_xinputhaptic_c.h" />
     <ClInclude Include="..\src\joystick\controller_type.h" />
-    <ClInclude Include="..\src\joystick\SDL_gamecontrollerdb.h" />
+    <ClInclude Include="..\src\joystick\SDL_gamepad_db.h" />
     <ClInclude Include="..\src\joystick\SDL_joystick_c.h" />
     <ClInclude Include="..\src\joystick\SDL_sysjoystick.h" />
     <ClInclude Include="..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
@@ -317,7 +317,7 @@
     <ClCompile Include="..\src\hidapi\SDL_hidapi.c" />
     <ClCompile Include="..\src\joystick\dummy\SDL_sysjoystick.c" />
     <ClCompile Include="..\src\joystick\controller_type.c" />
-    <ClCompile Include="..\src\joystick\SDL_gamecontroller.c" />
+    <ClCompile Include="..\src\joystick\SDL_gamepad.c" />
     <ClCompile Include="..\src\joystick\SDL_joystick.c" />
     <ClCompile Include="..\src\joystick\virtual\SDL_virtualjoystick.c" />
     <ClCompile Include="..\src\joystick\windows\SDL_dinputjoystick.c" />
diff --git a/VisualC-WinRT/SDL-UWP.vcxproj.filters b/VisualC-WinRT/SDL-UWP.vcxproj.filters
index 6e48a0ef4303..a6be95fe5c83 100644
--- a/VisualC-WinRT/SDL-UWP.vcxproj.filters
+++ b/VisualC-WinRT/SDL-UWP.vcxproj.filters
@@ -162,7 +162,7 @@
     <ClInclude Include="..\include\SDL3\SDL_video.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\src\joystick\SDL_gamecontrollerdb.h">
+    <ClInclude Include="..\src\joystick\SDL_gamepad_db.h">
       <Filter>Header Files</Filter>
     </ClInclude>
     <ClInclude Include="..\src\audio\disk\SDL_diskaudio.h">
@@ -540,7 +540,7 @@
     <ClCompile Include="..\src\joystick\dummy\SDL_sysjoystick.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\src\joystick\SDL_gamecontroller.c">
+    <ClCompile Include="..\src\joystick\SDL_gamepad.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\src\joystick\SDL_joystick.c">
diff --git a/VisualC/SDL.sln b/VisualC/SDL.sln
index bfaa2cd0c0f2..8541e9cd6dba 100644
--- a/VisualC/SDL.sln
+++ b/VisualC/SDL.sln
@@ -38,11 +38,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "tests\testsp
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3_test", "SDL_test\SDL_test.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamecontroller", "tests\testgamecontroller\testgamecontroller.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08305}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamepad", "tests\testgamepad\testgamepad.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08305}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgles2", "tests\testgles2\testgles2.vcxproj", "{E9558DFE-1961-4DD4-B09B-DD0EEFD5C315}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "controllermap", "tests\controllermap\controllermap.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08306}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gamepadmap", "tests\gamepadmap\gamepadmap.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08306}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testvulkan", "tests\testvulkan\testvulkan.vcxproj", "{0D604DFD-AAB6-442C-9368-F91A344146AB}"
 EndProject
diff --git a/VisualC/SDL/SDL.vcxproj b/VisualC/SDL/SDL.vcxproj
index 8d55da2a4fe8..ea1849f2da87 100644
--- a/VisualC/SDL/SDL.vcxproj
+++ b/VisualC/SDL/SDL.vcxproj
@@ -250,7 +250,7 @@
     <ClInclude Include="..\..\include\SDL3\SDL_error.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_events.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_filesystem.h" />
-    <ClInclude Include="..\..\include\SDL3\SDL_gamecontroller.h" />
+    <ClInclude Include="..\..\include\SDL3\SDL_gamepad.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_guid.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_haptic.h" />
     <ClInclude Include="..\..\include\SDL3\SDL_hints.h" />
@@ -347,7 +347,7 @@
     <ClInclude Include="..\..\src\joystick\controller_type.h" />
     <ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
     <ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.h" />
-    <ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
+    <ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h" />
     <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
     <ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
     <ClInclude Include="..\..\src\joystick\usb_ids.h" />
@@ -520,7 +520,7 @@
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
     <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
-    <ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
+    <ClCompile Include="..\..\src\joystick\SDL_gamepad.c" />
     <ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
     <ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
     <ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
diff --git a/VisualC/SDL/SDL.vcxproj.filters b/VisualC/SDL/SDL.vcxproj.filters
index 738543acb456..260a16a3c691 100644
--- a/VisualC/SDL/SDL.vcxproj.filters
+++ b/VisualC/SDL/SDL.vcxproj.filters
@@ -219,7 +219,7 @@
     <ClInclude Include="..\..\include\SDL3\SDL_filesystem.h">
       <Filter>API Headers</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\include\SDL3\SDL_gamecontroller.h">
+    <ClInclude Include="..\..\include\SDL3\SDL_gamepad.h">
       <Filter>API Headers</Filter>
     </ClInclude>
     <ClInclude Include="..\..\include\SDL3\SDL_guid.h">
@@ -477,7 +477,7 @@
     <ClInclude Include="..\..\src\haptic\SDL_haptic_c.h">
       <Filter>haptic</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h">
+    <ClInclude Include="..\..\src\joystick\SDL_gamepad_db.h">
       <Filter>joystick</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h">
@@ -904,7 +904,7 @@
     <ClCompile Include="..\..\src\joystick\controller_type.c">
       <Filter>joystick</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c">
+    <ClCompile Include="..\..\src\joystick\SDL_gamepad.c">
       <Filter>joystick</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\joystick\SDL_joystick.c">
diff --git a/VisualC/tests/controllermap/controllermap.vcxproj b/VisualC/tests/gamepadmap/gamepadmap.vcxproj
similarity index 95%
rename from VisualC/tests/controllermap/controllermap.vcxproj
rename to VisualC/tests/gamepadmap/gamepadmap.vcxproj
index c9f1473d64d4..a5c0ee7f568f 100644
--- a/VisualC/tests/controllermap/controllermap.vcxproj
+++ b/VisualC/tests/gamepadmap/gamepadmap.vcxproj
@@ -20,7 +20,7 @@
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{55812185-D13C-4022-9C81-32E0F4A08306}</ProjectGuid>
-    <RootNamespace>controllermap</RootNamespace>
+    <RootNamespace>gamepadmap</RootNamespace>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -89,7 +89,7 @@
       <MkTypLibCompatible>true</MkTypLibCompatible>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TargetEnvironment>Win32</TargetEnvironment>
-      <TypeLibraryName>.\Release/controllermap.tlb</TypeLibraryName>
+      <TypeLibraryName>.\Release/gamepadmap.tlb</TypeLibraryName>
     </Midl>
     <ClCompile>
       <AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -112,7 +112,7 @@
       <MkTypLibCompatible>true</MkTypLibCompatible>
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <TargetEnvironment>X64</TargetEnvironment>
-      <TypeLibraryName>.\Release/controlle

(Patch may be truncated, please check the link at the top of this post.)