SDL: Renamed SDL_Del* to SDL_Remove*

From f827c1322cac0a7ede1864d3c3ab9bfd159ad752 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 31 Aug 2024 07:23:51 -0700
Subject: [PATCH] Renamed SDL_Del* to SDL_Remove*

---
 build-scripts/SDL_migration.cocci          | 10 +++++++++
 docs/README-migration.md                   |  6 ++++++
 include/SDL3/SDL_events.h                  |  4 ++--
 include/SDL3/SDL_hints.h                   |  4 ++--
 include/SDL3/SDL_oldnames.h                |  4 ++++
 src/SDL_hints.c                            |  4 ++--
 src/core/linux/SDL_ibus.c                  |  2 +-
 src/dynapi/SDL_dynapi.sym                  |  4 ++--
 src/dynapi/SDL_dynapi_overrides.h          |  4 ++--
 src/dynapi/SDL_dynapi_procs.h              |  4 ++--
 src/events/SDL_events.c                    | 12 +++++------
 src/events/SDL_keyboard.c                  |  2 +-
 src/events/SDL_mouse.c                     | 24 +++++++++++-----------
 src/gpu/vulkan/SDL_gpu_vulkan.c            |  2 +-
 src/hidapi/SDL_hidapi.c                    |  4 ++--
 src/joystick/SDL_gamepad.c                 |  2 +-
 src/joystick/SDL_joystick.c                |  6 +++---
 src/joystick/apple/SDL_mfijoystick.m       |  2 +-
 src/joystick/hidapi/SDL_hidapi_gamecube.c  |  4 ++--
 src/joystick/hidapi/SDL_hidapi_luna.c      |  2 +-
 src/joystick/hidapi/SDL_hidapi_ps3.c       |  4 ++--
 src/joystick/hidapi/SDL_hidapi_ps4.c       |  6 +++---
 src/joystick/hidapi/SDL_hidapi_ps5.c       |  6 +++---
 src/joystick/hidapi/SDL_hidapi_shield.c    |  2 +-
 src/joystick/hidapi/SDL_hidapi_stadia.c    |  2 +-
 src/joystick/hidapi/SDL_hidapi_steam.c     |  2 +-
 src/joystick/hidapi/SDL_hidapi_steamdeck.c |  2 +-
 src/joystick/hidapi/SDL_hidapi_switch.c    | 12 +++++------
 src/joystick/hidapi/SDL_hidapi_wii.c       |  4 ++--
 src/joystick/hidapi/SDL_hidapi_xbox360.c   |  6 +++---
 src/joystick/hidapi/SDL_hidapi_xbox360w.c  |  8 ++++----
 src/joystick/hidapi/SDL_hidapi_xboxone.c   |  6 +++---
 src/joystick/hidapi/SDL_hidapijoystick.c   |  4 ++--
 src/main/SDL_main_callbacks.c              |  2 +-
 src/main/generic/SDL_sysmain_callbacks.c   |  2 +-
 src/render/SDL_render.c                    |  2 +-
 src/timer/SDL_timer.c                      |  2 +-
 src/video/cocoa/SDL_cocoametalview.m       |  2 +-
 src/video/cocoa/SDL_cocoaopengl.m          |  2 +-
 src/video/uikit/SDL_uikitviewcontroller.m  |  4 ++--
 src/video/windows/SDL_windowsvideo.c       |  8 ++++----
 src/video/windows/SDL_windowswindow.c      |  2 +-
 test/testautomation_clipboard.c            |  6 +++---
 test/testautomation_events.c               | 12 +++++------
 test/testautomation_hints.c                |  2 +-
 45 files changed, 118 insertions(+), 98 deletions(-)

diff --git a/build-scripts/SDL_migration.cocci b/build-scripts/SDL_migration.cocci
index 31e9d8faa5f9f..03abd962ff330 100644
--- a/build-scripts/SDL_migration.cocci
+++ b/build-scripts/SDL_migration.cocci
@@ -3633,3 +3633,13 @@ identifier func =~ "^(SDL_AddEventWatch|SDL_AddHintCallback|SDL_AddSurfaceAltern
 - SDL_AtomicGetPtr
 + SDL_AtomicGetPointer
   (...)
+@@
+@@
+- SDL_DelEventWatch
++ SDL_RemoveEventWatch
+  (...)
+@@
+@@
+- SDL_DelHintCallback
++ SDL_RemoveHintCallback
+  (...)
diff --git a/docs/README-migration.md b/docs/README-migration.md
index 430b15a2b6a65..43c88141ff099 100644
--- a/docs/README-migration.md
+++ b/docs/README-migration.md
@@ -488,6 +488,9 @@ The following functions have been removed:
 The following enums have been renamed:
 * SDL_eventaction => SDL_EventAction
 
+The following functions have been renamed:
+* SDL_DelEventWatch() => SDL_RemoveEventWatch()
+
 ## SDL_gamecontroller.h
 
 SDL_gamecontroller.h has been renamed SDL_gamepad.h, and all APIs have been renamed to match.
@@ -862,6 +865,9 @@ The following environment variables have been removed:
 The following functions have been removed:
 * SDL_ClearHints() - replaced with SDL_ResetHints()
 
+The following functions have been renamed:
+* SDL_DelHintCallback() => SDL_RemoveHintCallback()
+
 ## SDL_init.h
 
 On Haiku OS, SDL no longer sets the current working directory to the executable's path during SDL_Init(). If you need this functionality, the fastest solution is to add this code directly after the call to SDL_Init:
diff --git a/include/SDL3/SDL_events.h b/include/SDL3/SDL_events.h
index 1d94fc7d327a1..fbe2bb061b6aa 100644
--- a/include/SDL3/SDL_events.h
+++ b/include/SDL3/SDL_events.h
@@ -1379,7 +1379,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter *filter,
  *
  * \since This function is available since SDL 3.0.0.
  *
- * \sa SDL_DelEventWatch
+ * \sa SDL_RemoveEventWatch
  * \sa SDL_SetEventFilter
  */
 extern SDL_DECLSPEC SDL_bool SDLCALL SDL_AddEventWatch(SDL_EventFilter filter, void *userdata);
@@ -1397,7 +1397,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_AddEventWatch(SDL_EventFilter filter, v
  *
  * \sa SDL_AddEventWatch
  */
-extern SDL_DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter, void *userdata);
+extern SDL_DECLSPEC void SDLCALL SDL_RemoveEventWatch(SDL_EventFilter filter, void *userdata);
 
 /**
  * Run a specific filter function on the current event queue, removing any
diff --git a/include/SDL3/SDL_hints.h b/include/SDL3/SDL_hints.h
index 67fb3dccffaa7..8433240e6c75b 100644
--- a/include/SDL3/SDL_hints.h
+++ b/include/SDL3/SDL_hints.h
@@ -4307,7 +4307,7 @@ typedef void(SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const
  *
  * \since This function is available since SDL 3.0.0.
  *
- * \sa SDL_DelHintCallback
+ * \sa SDL_RemoveHintCallback
  */
 extern SDL_DECLSPEC SDL_bool SDLCALL SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata);
 
@@ -4325,7 +4325,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_AddHintCallback(const char *name, SDL_H
  *
  * \sa SDL_AddHintCallback
  */
-extern SDL_DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
+extern SDL_DECLSPEC void SDLCALL SDL_RemoveHintCallback(const char *name,
                                                      SDL_HintCallback callback,
                                                      void *userdata);
 
diff --git a/include/SDL3/SDL_oldnames.h b/include/SDL3/SDL_oldnames.h
index 558bcce9846fc..02c881c681477 100644
--- a/include/SDL3/SDL_oldnames.h
+++ b/include/SDL3/SDL_oldnames.h
@@ -118,6 +118,7 @@
 #define SDL_DROPCOMPLETE SDL_EVENT_DROP_COMPLETE
 #define SDL_DROPFILE SDL_EVENT_DROP_FILE
 #define SDL_DROPTEXT SDL_EVENT_DROP_TEXT
+#define SDL_DelEventWatch SDL_RemoveEventWatch
 #define SDL_FINGERDOWN SDL_EVENT_FINGER_DOWN
 #define SDL_FINGERMOTION SDL_EVENT_FINGER_MOTION
 #define SDL_FINGERUP SDL_EVENT_FINGER_UP
@@ -298,6 +299,7 @@
 #define SDL_MouseIsHaptic SDL_IsMouseHaptic
 
 /* ##SDL_hints.h */
+#define SDL_DelHintCallback SDL_RemoveHintCallback
 #define SDL_HINT_ALLOW_TOPMOST SDL_HINT_WINDOW_ALLOW_TOPMOST
 #define SDL_HINT_DIRECTINPUT_ENABLED SDL_HINT_JOYSTICK_DIRECTINPUT
 #define SDL_HINT_GDK_TEXTINPUT_DEFAULT SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT
@@ -739,6 +741,7 @@
 #define SDL_DROPCOMPLETE SDL_DROPCOMPLETE_renamed_SDL_EVENT_DROP_COMPLETE
 #define SDL_DROPFILE SDL_DROPFILE_renamed_SDL_EVENT_DROP_FILE
 #define SDL_DROPTEXT SDL_DROPTEXT_renamed_SDL_EVENT_DROP_TEXT
+#define SDL_DelEventWatch SDL_DelEventWatch_renamed_SDL_RemoveEventWatch
 #define SDL_FINGERDOWN SDL_FINGERDOWN_renamed_SDL_EVENT_FINGER_DOWN
 #define SDL_FINGERMOTION SDL_FINGERMOTION_renamed_SDL_EVENT_FINGER_MOTION
 #define SDL_FINGERUP SDL_FINGERUP_renamed_SDL_EVENT_FINGER_UP
@@ -920,6 +923,7 @@
 #define SDL_MouseIsHaptic SDL_MouseIsHaptic_renamed_SDL_IsMouseHaptic
 
 /* ##SDL_hints.h */
+#define SDL_DelHintCallback SDL_DelHintCallback_renamed_SDL_RemoveHintCallback
 #define SDL_HINT_ALLOW_TOPMOST SDL_HINT_ALLOW_TOPMOST_renamed_SDL_HINT_WINDOW_ALLOW_TOPMOST
 #define SDL_HINT_DIRECTINPUT_ENABLED SDL_HINT_DIRECTINPUT_ENABLED_renamed_SDL_HINT_JOYSTICK_DIRECTINPUT
 #define SDL_HINT_GDK_TEXTINPUT_DEFAULT SDL_HINT_GDK_TEXTINPUT_DEFAULT_renamed_SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT
diff --git a/src/SDL_hints.c b/src/SDL_hints.c
index 70fee997d16ab..8dd9c551ccb09 100644
--- a/src/SDL_hints.c
+++ b/src/SDL_hints.c
@@ -273,7 +273,7 @@ SDL_bool SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *
 
     SDL_LockProperties(hints);
 
-    SDL_DelHintCallback(name, callback, userdata);
+    SDL_RemoveHintCallback(name, callback, userdata);
 
     SDL_Hint *hint = (SDL_Hint *)SDL_GetPointerProperty(hints, name, NULL);
     if (hint) {
@@ -305,7 +305,7 @@ SDL_bool SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *
     return result;
 }
 
-void SDL_DelHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
+void SDL_RemoveHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
 {
     if (!name || !*name) {
         return;
diff --git a/src/core/linux/SDL_ibus.c b/src/core/linux/SDL_ibus.c
index ab14c1704a9c1..a6f0730aa9463 100644
--- a/src/core/linux/SDL_ibus.c
+++ b/src/core/linux/SDL_ibus.c
@@ -635,7 +635,7 @@ void SDL_IBus_Quit(void)
 
     // !!! FIXME: should we close(inotify_fd) here?
 
-    SDL_DelHintCallback(SDL_HINT_IME_IMPLEMENTED_UI, IBus_SetCapabilities, NULL);
+    SDL_RemoveHintCallback(SDL_HINT_IME_IMPLEMENTED_UI, IBus_SetCapabilities, NULL);
 
     SDL_memset(&ibus_cursor_rect, 0, sizeof(ibus_cursor_rect));
 }
diff --git a/src/dynapi/SDL_dynapi.sym b/src/dynapi/SDL_dynapi.sym
index c25df415e3a2f..9ce6598ee4bd3 100644
--- a/src/dynapi/SDL_dynapi.sym
+++ b/src/dynapi/SDL_dynapi.sym
@@ -117,8 +117,8 @@ SDL3_0.0.0 {
     SDL_CreateWindowWithProperties;
     SDL_CursorVisible;
     SDL_DateTimeToTime;
-    SDL_DelEventWatch;
-    SDL_DelHintCallback;
+    SDL_RemoveEventWatch;
+    SDL_RemoveHintCallback;
     SDL_Delay;
     SDL_DelayNS;
     SDL_DestroyAudioStream;
diff --git a/src/dynapi/SDL_dynapi_overrides.h b/src/dynapi/SDL_dynapi_overrides.h
index 3ad39a267c76f..a4b486adb5358 100644
--- a/src/dynapi/SDL_dynapi_overrides.h
+++ b/src/dynapi/SDL_dynapi_overrides.h
@@ -142,8 +142,8 @@
 #define SDL_CreateWindowWithProperties SDL_CreateWindowWithProperties_REAL
 #define SDL_CursorVisible SDL_CursorVisible_REAL
 #define SDL_DateTimeToTime SDL_DateTimeToTime_REAL
-#define SDL_DelEventWatch SDL_DelEventWatch_REAL
-#define SDL_DelHintCallback SDL_DelHintCallback_REAL
+#define SDL_RemoveEventWatch SDL_RemoveEventWatch_REAL
+#define SDL_RemoveHintCallback SDL_RemoveHintCallback_REAL
 #define SDL_Delay SDL_Delay_REAL
 #define SDL_DelayNS SDL_DelayNS_REAL
 #define SDL_DestroyAudioStream SDL_DestroyAudioStream_REAL
diff --git a/src/dynapi/SDL_dynapi_procs.h b/src/dynapi/SDL_dynapi_procs.h
index 768bf9cbecd04..07a6a5a890b7a 100644
--- a/src/dynapi/SDL_dynapi_procs.h
+++ b/src/dynapi/SDL_dynapi_procs.h
@@ -162,8 +162,6 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_CreateWindowAndRenderer,(const char *a, int b, int
 SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateWindowWithProperties,(SDL_PropertiesID a),(a),return)
 SDL_DYNAPI_PROC(SDL_bool,SDL_CursorVisible,(void),(),return)
 SDL_DYNAPI_PROC(SDL_bool,SDL_DateTimeToTime,(const SDL_DateTime *a, SDL_Time *b),(a,b),return)
-SDL_DYNAPI_PROC(void,SDL_DelEventWatch,(SDL_EventFilter a, void *b),(a,b),)
-SDL_DYNAPI_PROC(void,SDL_DelHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),)
 SDL_DYNAPI_PROC(void,SDL_Delay,(Uint32 a),(a),)
 SDL_DYNAPI_PROC(void,SDL_DelayNS,(Uint64 a),(a),)
 SDL_DYNAPI_PROC(void,SDL_DestroyAudioStream,(SDL_AudioStream *a),(a),)
@@ -739,6 +737,8 @@ SDL_DYNAPI_PROC(void,SDL_ReleaseGPUTexture,(SDL_GPUDevice *a, SDL_GPUTexture *b)
 SDL_DYNAPI_PROC(void,SDL_ReleaseGPUTransferBuffer,(SDL_GPUDevice *a, SDL_GPUTransferBuffer *b),(a,b),)
 SDL_DYNAPI_PROC(void,SDL_ReleaseWindowFromGPUDevice,(SDL_GPUDevice *a, SDL_Window *b),(a,b),)
 SDL_DYNAPI_PROC(SDL_bool,SDL_ReloadGamepadMappings,(void),(),return)
+SDL_DYNAPI_PROC(void,SDL_RemoveEventWatch,(SDL_EventFilter a, void *b),(a,b),)
+SDL_DYNAPI_PROC(void,SDL_RemoveHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),)
 SDL_DYNAPI_PROC(SDL_bool,SDL_RemovePath,(const char *a),(a),return)
 SDL_DYNAPI_PROC(SDL_bool,SDL_RemoveStoragePath,(SDL_Storage *a, const char *b),(a,b),return)
 SDL_DYNAPI_PROC(void,SDL_RemoveSurfaceAlternateImages,(SDL_Surface *a),(a),)
diff --git a/src/events/SDL_events.c b/src/events/SDL_events.c
index 564c483dfa90d..a532058c5a266 100644
--- a/src/events/SDL_events.c
+++ b/src/events/SDL_events.c
@@ -1589,7 +1589,7 @@ SDL_bool SDL_AddEventWatch(SDL_EventFilter filter, void *userdata)
     return result;
 }
 
-void SDL_DelEventWatch(SDL_EventFilter filter, void *userdata)
+void SDL_RemoveEventWatch(SDL_EventFilter filter, void *userdata)
 {
     SDL_LockMutex(SDL_event_watchers_lock);
     {
@@ -1768,7 +1768,7 @@ bool SDL_InitEvents(void)
     SDL_AddHintCallback(SDL_HINT_EVENT_LOGGING, SDL_EventLoggingChanged, NULL);
     SDL_AddHintCallback(SDL_HINT_POLL_SENTINEL, SDL_PollSentinelChanged, NULL);
     if (!SDL_StartEventLoop()) {
-        SDL_DelHintCallback(SDL_HINT_EVENT_LOGGING, SDL_EventLoggingChanged, NULL);
+        SDL_RemoveHintCallback(SDL_HINT_EVENT_LOGGING, SDL_EventLoggingChanged, NULL);
         return false;
     }
 
@@ -1781,13 +1781,13 @@ void SDL_QuitEvents(void)
 {
     SDL_QuitQuit();
     SDL_StopEventLoop();
-    SDL_DelHintCallback(SDL_HINT_POLL_SENTINEL, SDL_PollSentinelChanged, NULL);
-    SDL_DelHintCallback(SDL_HINT_EVENT_LOGGING, SDL_EventLoggingChanged, NULL);
+    SDL_RemoveHintCallback(SDL_HINT_POLL_SENTINEL, SDL_PollSentinelChanged, NULL);
+    SDL_RemoveHintCallback(SDL_HINT_EVENT_LOGGING, SDL_EventLoggingChanged, NULL);
 #ifndef SDL_JOYSTICK_DISABLED
-    SDL_DelHintCallback(SDL_HINT_AUTO_UPDATE_JOYSTICKS, SDL_AutoUpdateJoysticksChanged, NULL);
+    SDL_RemoveHintCallback(SDL_HINT_AUTO_UPDATE_JOYSTICKS, SDL_AutoUpdateJoysticksChanged, NULL);
 #endif
 #ifndef SDL_SENSOR_DISABLED
-    SDL_DelHintCallback(SDL_HINT_AUTO_UPDATE_SENSORS, SDL_AutoUpdateSensorsChanged, NULL);
+    SDL_RemoveHintCallback(SDL_HINT_AUTO_UPDATE_SENSORS, SDL_AutoUpdateSensorsChanged, NULL);
 #endif
 #ifdef SDL_PLATFORM_ANDROID
     Android_QuitEvents();
diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c
index 0cff195c71e2b..7aef8604ff207 100644
--- a/src/events/SDL_keyboard.c
+++ b/src/events/SDL_keyboard.c
@@ -867,7 +867,7 @@ void SDL_QuitKeyboard(void)
         SDL_keyboard.keymap = NULL;
     }
 
-    SDL_DelHintCallback(SDL_HINT_KEYCODE_OPTIONS,
+    SDL_RemoveHintCallback(SDL_HINT_KEYCODE_OPTIONS,
                         SDL_KeycodeOptionsChanged, &SDL_keyboard);
 }
 
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index dc8c305a25dab..f718ca20c5849 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -1121,40 +1121,40 @@ void SDL_QuitMouse(void)
     }
     mouse->num_system_scale_values = 0;
 
-    SDL_DelHintCallback(SDL_HINT_MOUSE_DOUBLE_CLICK_TIME,
+    SDL_RemoveHintCallback(SDL_HINT_MOUSE_DOUBLE_CLICK_TIME,
                         SDL_MouseDoubleClickTimeChanged, mouse);
 
-    SDL_DelHintCallback(SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS,
+    SDL_RemoveHintCallback(SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS,
                         SDL_MouseDoubleClickRadiusChanged, mouse);
 
-    SDL_DelHintCallback(SDL_HINT_MOUSE_NORMAL_SPEED_SCALE,
+    SDL_RemoveHintCallback(SDL_HINT_MOUSE_NORMAL_SPEED_SCALE,
                         SDL_MouseNormalSpeedScaleChanged, mouse);
 
-    SDL_DelHintCallback(SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE,
+    SDL_RemoveHintCallback(SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE,
                         SDL_MouseRelativeSpeedScaleChanged, mouse);
 
-    SDL_DelHintCallback(SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE,
+    SDL_RemoveHintCallback(SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE,
                         SDL_MouseRelativeSystemScaleChanged, mouse);
 
-    SDL_DelHintCallback(SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE,
+    SDL_RemoveHintCallback(SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE,
                         SDL_MouseWarpEmulationChanged, mouse);
 
-    SDL_DelHintCallback(SDL_HINT_TOUCH_MOUSE_EVENTS,
+    SDL_RemoveHintCallback(SDL_HINT_TOUCH_MOUSE_EVENTS,
                         SDL_TouchMouseEventsChanged, mouse);
 
-    SDL_DelHintCallback(SDL_HINT_MOUSE_TOUCH_EVENTS,
+    SDL_RemoveHintCallback(SDL_HINT_MOUSE_TOUCH_EVENTS,
                         SDL_MouseTouchEventsChanged, mouse);
 
-    SDL_DelHintCallback(SDL_HINT_MOUSE_AUTO_CAPTURE,
+    SDL_RemoveHintCallback(SDL_HINT_MOUSE_AUTO_CAPTURE,
                         SDL_MouseAutoCaptureChanged, mouse);
 
-    SDL_DelHintCallback(SDL_HINT_MOUSE_RELATIVE_WARP_MOTION,
+    SDL_RemoveHintCallback(SDL_HINT_MOUSE_RELATIVE_WARP_MOTION,
                         SDL_MouseRelativeWarpMotionChanged, mouse);
 
-    SDL_DelHintCallback(SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE,
+    SDL_RemoveHintCallback(SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE,
                         SDL_MouseRelativeCursorVisibleChanged, mouse);
 
-    SDL_DelHintCallback(SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL,
+    SDL_RemoveHintCallback(SDL_HINT_MOUSE_RELATIVE_CLIP_INTERVAL,
                         SDL_MouseRelativeClipIntervalChanged, mouse);
 
     for (int i = SDL_mouse_count; i--; ) {
diff --git a/src/gpu/vulkan/SDL_gpu_vulkan.c b/src/gpu/vulkan/SDL_gpu_vulkan.c
index 07d5750a128c4..9f239103c1514 100644
--- a/src/gpu/vulkan/SDL_gpu_vulkan.c
+++ b/src/gpu/vulkan/SDL_gpu_vulkan.c
@@ -9779,7 +9779,7 @@ static void VULKAN_ReleaseWindow(
     SDL_free(windowData);
 
     SDL_ClearProperty(SDL_GetWindowProperties(window), WINDOW_PROPERTY_DATA);
-    SDL_DelEventWatch(VULKAN_INTERNAL_OnWindowResize, window);
+    SDL_RemoveEventWatch(VULKAN_INTERNAL_OnWindowResize, window);
 }
 
 static bool VULKAN_INTERNAL_RecreateSwapchain(
diff --git a/src/hidapi/SDL_hidapi.c b/src/hidapi/SDL_hidapi.c
index cf4c29e3dce41..88c5092ec3576 100644
--- a/src/hidapi/SDL_hidapi.c
+++ b/src/hidapi/SDL_hidapi.c
@@ -1287,8 +1287,8 @@ int SDL_hid_exit(void)
     }
 #endif // HAVE_LIBUSB
 
-    SDL_DelHintCallback(SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS, OnlyControllersChanged, NULL);
-    SDL_DelHintCallback(SDL_HINT_HIDAPI_IGNORE_DEVICES, IgnoredDevicesChanged, NULL);
+    SDL_RemoveHintCallback(SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS, OnlyControllersChanged, NULL);
+    SDL_RemoveHintCallback(SDL_HINT_HIDAPI_IGNORE_DEVICES, IgnoredDevicesChanged, NULL);
 
     if (SDL_hidapi_ignored_devices) {
         SDL_free(SDL_hidapi_ignored_devices);
diff --git a/src/joystick/SDL_gamepad.c b/src/joystick/SDL_gamepad.c
index d374fc21e41ff..0a4b202ab7208 100644
--- a/src/joystick/SDL_gamepad.c
+++ b/src/joystick/SDL_gamepad.c
@@ -3680,7 +3680,7 @@ void SDL_QuitGamepads(void)
 
     SDL_gamepads_initialized = false;
 
-    SDL_DelEventWatch(SDL_GamepadEventWatcher, NULL);
+    SDL_RemoveEventWatch(SDL_GamepadEventWatcher, NULL);
 
     while (SDL_gamepads) {
         SDL_gamepads->ref_count = 1;
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index e271ab9bdbcbf..594d3d15103b0 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -1956,7 +1956,7 @@ void SDL_QuitJoysticks(void)
 
     SDL_QuitSteamVirtualGamepadInfo();
 
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS,
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS,
                         SDL_JoystickAllowBackgroundEventsChanged, NULL);
 
     SDL_FreeVIDPIDList(&arcadestick_devices);
@@ -3795,11 +3795,11 @@ bool SDL_VIDPIDInList(Uint16 vendor_id, Uint16 product_id, const SDL_vidpid_list
 void SDL_FreeVIDPIDList(SDL_vidpid_list *list)
 {
     if (list->included_hint_name) {
-        SDL_DelHintCallback(list->included_hint_name, SDL_VIDPIDIncludedHintChanged, list);
+        SDL_RemoveHintCallback(list->included_hint_name, SDL_VIDPIDIncludedHintChanged, list);
     }
 
     if (list->excluded_hint_name) {
-        SDL_DelHintCallback(list->excluded_hint_name, SDL_VIDPIDExcludedHintChanged, list);
+        SDL_RemoveHintCallback(list->excluded_hint_name, SDL_VIDPIDExcludedHintChanged, list);
     }
 
     if (list->included_entries) {
diff --git a/src/joystick/apple/SDL_mfijoystick.m b/src/joystick/apple/SDL_mfijoystick.m
index ac15568dfe009..9eee950b47fdd 100644
--- a/src/joystick/apple/SDL_mfijoystick.m
+++ b/src/joystick/apple/SDL_mfijoystick.m
@@ -1708,7 +1708,7 @@ static void IOS_JoystickQuit(void)
         }
 
 #ifdef SDL_PLATFORM_TVOS
-        SDL_DelHintCallback(SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION,
+        SDL_RemoveHintCallback(SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION,
                             SDL_AppleTVRemoteRotationHintChanged, NULL);
 #endif // SDL_PLATFORM_TVOS
 #endif // SDL_JOYSTICK_MFI
diff --git a/src/joystick/hidapi/SDL_hidapi_gamecube.c b/src/joystick/hidapi/SDL_hidapi_gamecube.c
index 0932001c44d7f..9decc76e3e520 100644
--- a/src/joystick/hidapi/SDL_hidapi_gamecube.c
+++ b/src/joystick/hidapi/SDL_hidapi_gamecube.c
@@ -56,7 +56,7 @@ static void HIDAPI_DriverGameCube_RegisterHints(SDL_HintCallback callback, void
 
 static void HIDAPI_DriverGameCube_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE, callback, userdata);
 }
 
 static bool HIDAPI_DriverGameCube_IsEnabled(void)
@@ -503,7 +503,7 @@ static void HIDAPI_DriverGameCube_FreeDevice(SDL_HIDAPI_Device *device)
 {
     SDL_DriverGameCube_Context *ctx = (SDL_DriverGameCube_Context *)device->context;
 
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE,
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE,
                         SDL_JoystickGameCubeRumbleBrakeHintChanged, ctx);
 }
 
diff --git a/src/joystick/hidapi/SDL_hidapi_luna.c b/src/joystick/hidapi/SDL_hidapi_luna.c
index 617b8bd840c3d..a9379c57ae3c1 100644
--- a/src/joystick/hidapi/SDL_hidapi_luna.c
+++ b/src/joystick/hidapi/SDL_hidapi_luna.c
@@ -54,7 +54,7 @@ static void HIDAPI_DriverLuna_RegisterHints(SDL_HintCallback callback, void *use
 
 static void HIDAPI_DriverLuna_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_LUNA, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_LUNA, callback, userdata);
 }
 
 static bool HIDAPI_DriverLuna_IsEnabled(void)
diff --git a/src/joystick/hidapi/SDL_hidapi_ps3.c b/src/joystick/hidapi/SDL_hidapi_ps3.c
index c27550798dd29..473bcc366c858 100644
--- a/src/joystick/hidapi/SDL_hidapi_ps3.c
+++ b/src/joystick/hidapi/SDL_hidapi_ps3.c
@@ -98,7 +98,7 @@ static void HIDAPI_DriverPS3_RegisterHints(SDL_HintCallback callback, void *user
 
 static void HIDAPI_DriverPS3_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS3, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS3, callback, userdata);
 }
 
 static bool HIDAPI_DriverPS3_IsEnabled(void)
@@ -1059,7 +1059,7 @@ static void HIDAPI_DriverPS3SonySixaxis_RegisterHints(SDL_HintCallback callback,
 
 static void HIDAPI_DriverPS3SonySixaxis_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER, callback, userdata);
 }
 
 static bool HIDAPI_DriverPS3SonySixaxis_IsEnabled(void)
diff --git a/src/joystick/hidapi/SDL_hidapi_ps4.c b/src/joystick/hidapi/SDL_hidapi_ps4.c
index 2ccd667b9ada6..640a67787d375 100644
--- a/src/joystick/hidapi/SDL_hidapi_ps4.c
+++ b/src/joystick/hidapi/SDL_hidapi_ps4.c
@@ -191,7 +191,7 @@ static void HIDAPI_DriverPS4_RegisterHints(SDL_HintCallback callback, void *user
 
 static void HIDAPI_DriverPS4_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS4, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS4, callback, userdata);
 }
 
 static bool HIDAPI_DriverPS4_IsEnabled(void)
@@ -1350,9 +1350,9 @@ static void HIDAPI_DriverPS4_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joysti
 {
     SDL_DriverPS4_Context *ctx = (SDL_DriverPS4_Context *)device->context;
 
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL,
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL,
                         SDL_PS4ReportIntervalHintChanged, ctx);
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE,
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE,
                         SDL_PS4RumbleHintChanged, ctx);
 
     ctx->joystick = NULL;
diff --git a/src/joystick/hidapi/SDL_hidapi_ps5.c b/src/joystick/hidapi/SDL_hidapi_ps5.c
index 9cb20e9c102d1..6978661bd7bf7 100644
--- a/src/joystick/hidapi/SDL_hidapi_ps5.c
+++ b/src/joystick/hidapi/SDL_hidapi_ps5.c
@@ -281,7 +281,7 @@ static void HIDAPI_DriverPS5_RegisterHints(SDL_HintCallback callback, void *user
 
 static void HIDAPI_DriverPS5_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS5, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS5, callback, userdata);
 }
 
 static bool HIDAPI_DriverPS5_IsEnabled(void)
@@ -1589,10 +1589,10 @@ static void HIDAPI_DriverPS5_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joysti
 {
     SDL_DriverPS5_Context *ctx = (SDL_DriverPS5_Context *)device->context;
 
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE,
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE,
                         SDL_PS5RumbleHintChanged, ctx);
 
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED,
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED,
                         SDL_PS5PlayerLEDHintChanged, ctx);
 
     ctx->joystick = NULL;
diff --git a/src/joystick/hidapi/SDL_hidapi_shield.c b/src/joystick/hidapi/SDL_hidapi_shield.c
index 0af245d9a0418..a09e76e7edda9 100644
--- a/src/joystick/hidapi/SDL_hidapi_shield.c
+++ b/src/joystick/hidapi/SDL_hidapi_shield.c
@@ -99,7 +99,7 @@ static void HIDAPI_DriverShield_RegisterHints(SDL_HintCallback callback, void *u
 
 static void HIDAPI_DriverShield_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SHIELD, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SHIELD, callback, userdata);
 }
 
 static bool HIDAPI_DriverShield_IsEnabled(void)
diff --git a/src/joystick/hidapi/SDL_hidapi_stadia.c b/src/joystick/hidapi/SDL_hidapi_stadia.c
index 9df098502207e..0202e32bafa48 100644
--- a/src/joystick/hidapi/SDL_hidapi_stadia.c
+++ b/src/joystick/hidapi/SDL_hidapi_stadia.c
@@ -51,7 +51,7 @@ static void HIDAPI_DriverStadia_RegisterHints(SDL_HintCallback callback, void *u
 
 static void HIDAPI_DriverStadia_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_STADIA, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_STADIA, callback, userdata);
 }
 
 static bool HIDAPI_DriverStadia_IsEnabled(void)
diff --git a/src/joystick/hidapi/SDL_hidapi_steam.c b/src/joystick/hidapi/SDL_hidapi_steam.c
index c6a3d670461b9..a6b54fee5fb6e 100644
--- a/src/joystick/hidapi/SDL_hidapi_steam.c
+++ b/src/joystick/hidapi/SDL_hidapi_steam.c
@@ -953,7 +953,7 @@ static void HIDAPI_DriverSteam_RegisterHints(SDL_HintCallback callback, void *us
 
 static void HIDAPI_DriverSteam_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_STEAM, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_STEAM, callback, userdata);
 }
 
 static bool HIDAPI_DriverSteam_IsEnabled(void)
diff --git a/src/joystick/hidapi/SDL_hidapi_steamdeck.c b/src/joystick/hidapi/SDL_hidapi_steamdeck.c
index 3c6d58fb1d9d6..eb32a86bc459e 100644
--- a/src/joystick/hidapi/SDL_hidapi_steamdeck.c
+++ b/src/joystick/hidapi/SDL_hidapi_steamdeck.c
@@ -244,7 +244,7 @@ static void HIDAPI_DriverSteamDeck_RegisterHints(SDL_HintCallback callback, void
 
 static void HIDAPI_DriverSteamDeck_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK, callback, userdata);
 }
 
 static bool HIDAPI_DriverSteamDeck_IsEnabled(void)
diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c
index 79a879785053e..a9030c3ef391c 100644
--- a/src/joystick/hidapi/SDL_hidapi_switch.c
+++ b/src/joystick/hidapi/SDL_hidapi_switch.c
@@ -1134,7 +1134,7 @@ static void HIDAPI_DriverNintendoClassic_RegisterHints(SDL_HintCallback callback
 
 static void HIDAPI_DriverNintendoClassic_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC, callback, userdata);
 }
 
 static bool HIDAPI_DriverNintendoClassic_IsEnabled(void)
@@ -1175,7 +1175,7 @@ static void HIDAPI_DriverJoyCons_RegisterHints(SDL_HintCallback callback, void *
 
 static void HIDAPI_DriverJoyCons_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, callback, userdata);
 }
 
 static bool HIDAPI_DriverJoyCons_IsEnabled(void)
@@ -1211,7 +1211,7 @@ static void HIDAPI_DriverSwitch_RegisterHints(SDL_HintCallback callback, void *u
 
 static void HIDAPI_DriverSwitch_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SWITCH, callback, userdata);
 }
 
 static bool HIDAPI_DriverSwitch_IsEnabled(void)
@@ -2660,14 +2660,14 @@ static void HIDAPI_DriverSwitch_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joy
 
     if (ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConLeft ||
         ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConRight) {
-        SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED,
+        SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED,
                             SDL_HomeLEDHintChanged, ctx);
     } else {
-        SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED,
+        SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED,
                             SDL_HomeLEDHintChanged, ctx);
     }
 
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED,
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED,
                         SDL_PlayerLEDHintChanged, ctx);
 
     ctx->joystick = NULL;
diff --git a/src/joystick/hidapi/SDL_hidapi_wii.c b/src/joystick/hidapi/SDL_hidapi_wii.c
index c92ef6afa1196..7f9cad76cf426 100644
--- a/src/joystick/hidapi/SDL_hidapi_wii.c
+++ b/src/joystick/hidapi/SDL_hidapi_wii.c
@@ -165,7 +165,7 @@ static void HIDAPI_DriverWii_RegisterHints(SDL_HintCallback callback, void *user
 
 static void HIDAPI_DriverWii_UnregisterHints(SDL_HintCallback callback, void *userdata)
 {
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_WII, callback, userdata);
+    SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_WII, callback, userdata);
 }
 
 static bool HIDAPI_DriverWii_IsEnabled(void)
@@ -1580,7 +1580,7 @@ static void HIDAPI_DriverWii_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Joysti
 {
     SDL_DriverWii_Context *ctx = (SDL_DriverWii_Context *)device->context;
 
-    SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_WII

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