diff --git a/build-scripts/SDL_migration.cocci b/build-scripts/SDL_migration.cocci index 31e9d8faa..03abd962f 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 430b15a2b..43c88141f 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 1d94fc7d3..fbe2bb061 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 67fb3dccf..8433240e6 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 558bcce98..02c881c68 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 70fee997d..8dd9c551c 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 ab14c1704..a6f0730aa 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 c25df415e..9ce6598ee 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 3ad39a267..a4b486adb 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 768bf9cbe..07a6a5a89 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 564c483df..a532058c5 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 0cff195c7..7aef8604f 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 dc8c305a2..f718ca20c 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 07d5750a1..9f239103c 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 cf4c29e3d..88c5092ec 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 d374fc21e..0a4b202ab 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 e271ab9bd..594d3d151 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 ac15568df..9eee950b4 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 0932001c4..9decc76e3 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 617b8bd84..a9379c57a 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 c27550798..473bcc366 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 2ccd667b9..640a67787 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 9cb20e9c1..6978661bd 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 0af245d9a..a09e76e7e 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 9df098502..0202e32ba 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 c6a3d6704..a6b54fee5 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 3c6d58fb1..eb32a86bc 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 79a879785..a9030c3ef 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 c92ef6afa..7f9cad76c 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_PLAYER_LED, + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED, SDL_PlayerLEDHintChanged, ctx); ctx->joystick = NULL; diff --git a/src/joystick/hidapi/SDL_hidapi_xbox360.c b/src/joystick/hidapi/SDL_hidapi_xbox360.c index 7883dadac..79f9403cc 100644 --- a/src/joystick/hidapi/SDL_hidapi_xbox360.c +++ b/src/joystick/hidapi/SDL_hidapi_xbox360.c @@ -49,8 +49,8 @@ static void HIDAPI_DriverXbox360_RegisterHints(SDL_HintCallback callback, void * static void HIDAPI_DriverXbox360_UnregisterHints(SDL_HintCallback callback, void *userdata) { - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, callback, userdata); + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, callback, userdata); } static bool HIDAPI_DriverXbox360_IsEnabled(void) @@ -366,7 +366,7 @@ static void HIDAPI_DriverXbox360_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Jo { SDL_DriverXbox360_Context *ctx = (SDL_DriverXbox360_Context *)device->context; - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED, + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED, SDL_PlayerLEDHintChanged, ctx); ctx->joystick = NULL; diff --git a/src/joystick/hidapi/SDL_hidapi_xbox360w.c b/src/joystick/hidapi/SDL_hidapi_xbox360w.c index f2404685d..5952dbdf0 100644 --- a/src/joystick/hidapi/SDL_hidapi_xbox360w.c +++ b/src/joystick/hidapi/SDL_hidapi_xbox360w.c @@ -50,9 +50,9 @@ static void HIDAPI_DriverXbox360W_RegisterHints(SDL_HintCallback callback, void static void HIDAPI_DriverXbox360W_UnregisterHints(SDL_HintCallback callback, void *userdata) { - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, callback, userdata); - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS, callback, userdata); + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360, callback, userdata); + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS, callback, userdata); } static bool HIDAPI_DriverXbox360W_IsEnabled(void) @@ -351,7 +351,7 @@ static void HIDAPI_DriverXbox360W_CloseJoystick(SDL_HIDAPI_Device *device, SDL_J { SDL_DriverXbox360W_Context *ctx = (SDL_DriverXbox360W_Context *)device->context; - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED, + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED, SDL_PlayerLEDHintChanged, ctx); } diff --git a/src/joystick/hidapi/SDL_hidapi_xboxone.c b/src/joystick/hidapi/SDL_hidapi_xboxone.c index 67cf335e8..2717828ec 100644 --- a/src/joystick/hidapi/SDL_hidapi_xboxone.c +++ b/src/joystick/hidapi/SDL_hidapi_xboxone.c @@ -338,8 +338,8 @@ static void HIDAPI_DriverXboxOne_RegisterHints(SDL_HintCallback callback, void * static void HIDAPI_DriverXboxOne_UnregisterHints(SDL_HintCallback callback, void *userdata) { - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE, callback, userdata); + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX, callback, userdata); + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE, callback, userdata); } static bool HIDAPI_DriverXboxOne_IsEnabled(void) @@ -1634,7 +1634,7 @@ static void HIDAPI_DriverXboxOne_CloseJoystick(SDL_HIDAPI_Device *device, SDL_Jo { SDL_DriverXboxOne_Context *ctx = (SDL_DriverXboxOne_Context *)device->context; - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED, + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED, SDL_HomeLEDHintChanged, ctx); } diff --git a/src/joystick/hidapi/SDL_hidapijoystick.c b/src/joystick/hidapi/SDL_hidapijoystick.c index 67539ceeb..b3c3a1263 100644 --- a/src/joystick/hidapi/SDL_hidapijoystick.c +++ b/src/joystick/hidapi/SDL_hidapijoystick.c @@ -1682,9 +1682,9 @@ static void HIDAPI_JoystickQuit(void) SDL_HIDAPI_DeviceDriver *driver = SDL_HIDAPI_drivers[i]; driver->UnregisterHints(SDL_HIDAPIDriverHintChanged, driver); } - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS, + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS, SDL_HIDAPIDriverHintChanged, NULL); - SDL_DelHintCallback(SDL_HINT_JOYSTICK_HIDAPI, + SDL_RemoveHintCallback(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPIDriverHintChanged, NULL); SDL_hid_exit(); diff --git a/src/main/SDL_main_callbacks.c b/src/main/SDL_main_callbacks.c index 284aaf900..2e781d8f1 100644 --- a/src/main/SDL_main_callbacks.c +++ b/src/main/SDL_main_callbacks.c @@ -132,7 +132,7 @@ SDL_AppResult SDL_IterateMainCallbacks(bool pump_events) void SDL_QuitMainCallbacks(void) { - SDL_DelEventWatch(SDL_MainCallbackEventWatcher, NULL); + SDL_RemoveEventWatch(SDL_MainCallbackEventWatcher, NULL); SDL_main_quit_callback(SDL_main_appstate); SDL_main_appstate = NULL; // just in case. diff --git a/src/main/generic/SDL_sysmain_callbacks.c b/src/main/generic/SDL_sysmain_callbacks.c index 4b38b96d2..05fc54b29 100644 --- a/src/main/generic/SDL_sysmain_callbacks.c +++ b/src/main/generic/SDL_sysmain_callbacks.c @@ -73,7 +73,7 @@ int SDL_EnterAppMainCallbacks(int argc, char* argv[], SDL_AppInit_func appinit, } } - SDL_DelHintCallback(SDL_HINT_MAIN_CALLBACK_RATE, MainCallbackRateHintChanged, NULL); + SDL_RemoveHintCallback(SDL_HINT_MAIN_CALLBACK_RATE, MainCallbackRateHintChanged, NULL); } SDL_QuitMainCallbacks(); diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 1f757cdd1..73cc61176 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -5126,7 +5126,7 @@ void SDL_DestroyRendererWithoutFreeing(SDL_Renderer *renderer) renderer->destroyed = true; - SDL_DelEventWatch(SDL_RendererEventWatch, renderer); + SDL_RemoveEventWatch(SDL_RendererEventWatch, renderer); if (renderer->window) { SDL_PropertiesID props = SDL_GetWindowProperties(renderer->window); diff --git a/src/timer/SDL_timer.c b/src/timer/SDL_timer.c index 5ff15ab55..3cd1da3aa 100644 --- a/src/timer/SDL_timer.c +++ b/src/timer/SDL_timer.c @@ -595,7 +595,7 @@ void SDL_InitTicks(void) void SDL_QuitTicks(void) { - SDL_DelHintCallback(SDL_HINT_TIMER_RESOLUTION, + SDL_RemoveHintCallback(SDL_HINT_TIMER_RESOLUTION, SDL_TimerResolutionChanged, NULL); SDL_SetSystemTimerResolutionMS(0); // always release our timer resolution request. diff --git a/src/video/cocoa/SDL_cocoametalview.m b/src/video/cocoa/SDL_cocoametalview.m index 99ff9fd0a..548c84150 100644 --- a/src/video/cocoa/SDL_cocoametalview.m +++ b/src/video/cocoa/SDL_cocoametalview.m @@ -98,7 +98,7 @@ static SDL_bool SDLCALL SDL_MetalViewEventWatch(void *userdata, SDL_Event *event - (void)dealloc { - SDL_DelEventWatch(SDL_MetalViewEventWatch, (__bridge void *)(self)); + SDL_RemoveEventWatch(SDL_MetalViewEventWatch, (__bridge void *)(self)); } - (NSInteger)tag diff --git a/src/video/cocoa/SDL_cocoaopengl.m b/src/video/cocoa/SDL_cocoaopengl.m index b8e93ab55..6d0f5764e 100644 --- a/src/video/cocoa/SDL_cocoaopengl.m +++ b/src/video/cocoa/SDL_cocoaopengl.m @@ -208,7 +208,7 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt { [self setWindow:NULL]; - SDL_DelHintCallback(SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH, SDL_OpenGLAsyncDispatchChanged, NULL); + SDL_RemoveHintCallback(SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH, SDL_OpenGLAsyncDispatchChanged, NULL); if (self->displayLink) { CVDisplayLinkRelease(self->displayLink); self->displayLink = nil; diff --git a/src/video/uikit/SDL_uikitviewcontroller.m b/src/video/uikit/SDL_uikitviewcontroller.m index 4ebe9d15e..dbde3f9d3 100644 --- a/src/video/uikit/SDL_uikitviewcontroller.m +++ b/src/video/uikit/SDL_uikitviewcontroller.m @@ -126,13 +126,13 @@ static void SDLCALL SDL_HideHomeIndicatorHintChanged(void *userdata, const char #endif #ifdef SDL_PLATFORM_TVOS - SDL_DelHintCallback(SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS, + SDL_RemoveHintCallback(SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS, SDL_AppleTVControllerUIHintChanged, (__bridge void *)self); #endif #ifndef SDL_PLATFORM_TVOS - SDL_DelHintCallback(SDL_HINT_IOS_HIDE_HOME_INDICATOR, + SDL_RemoveHintCallback(SDL_HINT_IOS_HIDE_HOME_INDICATOR, SDL_HideHomeIndicatorHintChanged, (__bridge void *)self); #endif diff --git a/src/video/windows/SDL_windowsvideo.c b/src/video/windows/SDL_windowsvideo.c index e2004d968..05b45bc93 100644 --- a/src/video/windows/SDL_windowsvideo.c +++ b/src/video/windows/SDL_windowsvideo.c @@ -536,10 +536,10 @@ void WIN_VideoQuit(SDL_VideoDevice *_this) { SDL_VideoData *data = _this->internal; - SDL_DelHintCallback(SDL_HINT_WINDOWS_RAW_KEYBOARD, UpdateWindowsRawKeyboard, _this); - SDL_DelHintCallback(SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP, UpdateWindowsEnableMessageLoop, NULL); - SDL_DelHintCallback(SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS, UpdateWindowsEnableMenuMnemonics, NULL); - SDL_DelHintCallback(SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN, UpdateWindowFrameUsableWhileCursorHidden, NULL); + SDL_RemoveHintCallback(SDL_HINT_WINDOWS_RAW_KEYBOARD, UpdateWindowsRawKeyboard, _this); + SDL_RemoveHintCallback(SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP, UpdateWindowsEnableMessageLoop, NULL); + SDL_RemoveHintCallback(SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS, UpdateWindowsEnableMenuMnemonics, NULL); + SDL_RemoveHintCallback(SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN, UpdateWindowFrameUsableWhileCursorHidden, NULL); WIN_SetRawMouseEnabled(_this, false); WIN_SetRawKeyboardEnabled(_this, false); diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index 5695fac68..bbe8aa8b8 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -588,7 +588,7 @@ static void CleanupWindowData(SDL_VideoDevice *_this, SDL_Window *window) SDL_WindowData *data = window->internal; if (data) { - SDL_DelHintCallback(SDL_HINT_MOUSE_RELATIVE_MODE_CENTER, WIN_MouseRelativeModeCenterChanged, data); + SDL_RemoveHintCallback(SDL_HINT_MOUSE_RELATIVE_MODE_CENTER, WIN_MouseRelativeModeCenterChanged, data); #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) if (data->drop_target) { diff --git a/test/testautomation_clipboard.c b/test/testautomation_clipboard.c index 81d448eee..6e0e2c409 100644 --- a/test/testautomation_clipboard.c +++ b/test/testautomation_clipboard.c @@ -389,7 +389,7 @@ static int clipboard_testClipboardDataFunctions(void *arg) !boolResult, "Verify has test text data, expected SDL_FALSE, got SDL_TRUE"); - SDL_DelEventWatch(ClipboardEventWatch, NULL); + SDL_RemoveEventWatch(ClipboardEventWatch, NULL); return TEST_COMPLETED; } @@ -473,7 +473,7 @@ static int clipboard_testClipboardTextFunctions(void *arg) SDL_free(textRef); SDL_free(text); - SDL_DelEventWatch(ClipboardEventWatch, NULL); + SDL_RemoveEventWatch(ClipboardEventWatch, NULL); return TEST_COMPLETED; } @@ -556,7 +556,7 @@ static int clipboard_testPrimarySelectionTextFunctions(void *arg) SDL_free(textRef); SDL_free(text); - SDL_DelEventWatch(ClipboardEventWatch, NULL); + SDL_RemoveEventWatch(ClipboardEventWatch, NULL); return TEST_COMPLETED; } diff --git a/test/testautomation_events.c b/test/testautomation_events.c index 71c4de8e8..ec0a3485a 100644 --- a/test/testautomation_events.c +++ b/test/testautomation_events.c @@ -106,7 +106,7 @@ static int events_pushPumpAndPollUserevent(void *arg) * Adds and deletes an event watch function with NULL userdata * * \sa SDL_AddEventWatch - * \sa SDL_DelEventWatch + * \sa SDL_RemoveEventWatch * */ static int events_addDelEventWatch(void *arg) @@ -138,8 +138,8 @@ static int events_addDelEventWatch(void *arg) SDLTest_AssertCheck(g_eventFilterCalled == 1, "Check that event filter was called"); /* Delete watch */ - SDL_DelEventWatch(events_sampleNullEventFilter, NULL); - SDLTest_AssertPass("Call to SDL_DelEventWatch()"); + SDL_RemoveEventWatch(events_sampleNullEventFilter, NULL); + SDLTest_AssertPass("Call to SDL_RemoveEventWatch()"); /* Push a user event onto the queue and force queue update */ g_eventFilterCalled = 0; @@ -156,7 +156,7 @@ static int events_addDelEventWatch(void *arg) * Adds and deletes an event watch function with userdata * * \sa SDL_AddEventWatch - * \sa SDL_DelEventWatch + * \sa SDL_RemoveEventWatch * */ static int events_addDelEventWatchWithUserdata(void *arg) @@ -189,8 +189,8 @@ static int events_addDelEventWatchWithUserdata(void *arg) SDLTest_AssertCheck(g_eventFilterCalled == 1, "Check that event filter was called"); /* Delete watch */ - SDL_DelEventWatch(events_sampleNullEventFilter, (void *)&g_userdataValue); - SDLTest_AssertPass("Call to SDL_DelEventWatch()"); + SDL_RemoveEventWatch(events_sampleNullEventFilter, (void *)&g_userdataValue); + SDLTest_AssertPass("Call to SDL_RemoveEventWatch()"); /* Push a user event onto the queue and force queue update */ g_eventFilterCalled = 0; diff --git a/test/testautomation_hints.c b/test/testautomation_hints.c index 95cbe2a79..42a68f6d6 100644 --- a/test/testautomation_hints.c +++ b/test/testautomation_hints.c @@ -215,7 +215,7 @@ static int hints_setHint(void *arg) SDLTest_AssertPass("Call to SDL_ResetHint(), after clearing callback"); callbackValue = NULL; - SDL_DelHintCallback(testHint, hints_testHintChanged, &callbackValue); + SDL_RemoveHintCallback(testHint, hints_testHintChanged, &callbackValue); SDL_ResetHint(testHint); SDLTest_AssertCheck( callbackValue == NULL,