diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c index fc06f07258..e281f5daaa 100644 --- a/src/events/SDL_keyboard.c +++ b/src/events/SDL_keyboard.c @@ -172,19 +172,6 @@ void SDL_RemoveKeyboard(SDL_KeyboardID keyboardID, bool send_event) } } -void SDL_SetKeyboardName(SDL_KeyboardID keyboardID, const char *name) -{ - SDL_assert(keyboardID != 0); - - const int keyboard_index = SDL_GetKeyboardIndex(keyboardID); - - if (keyboard_index >= 0) { - SDL_KeyboardInstance *instance = &SDL_keyboards[keyboard_index]; - SDL_free(instance->name); - instance->name = SDL_strdup(name ? name : ""); - } -} - bool SDL_HasKeyboard(void) { return (SDL_keyboard_count > 0); diff --git a/src/events/SDL_keyboard_c.h b/src/events/SDL_keyboard_c.h index 9a6589ddb2..ddfb5c5747 100644 --- a/src/events/SDL_keyboard_c.h +++ b/src/events/SDL_keyboard_c.h @@ -43,9 +43,6 @@ extern void SDL_AddKeyboard(SDL_KeyboardID keyboardID, const char *name, bool se // A keyboard has been removed from the system extern void SDL_RemoveKeyboard(SDL_KeyboardID keyboardID, bool send_event); -// Set or update the name of a keyboard instance. -extern void SDL_SetKeyboardName(SDL_KeyboardID keyboardID, const char *name); - // Set the mapping of scancode to key codes extern void SDL_SetKeymap(SDL_Keymap *keymap, bool send_event); diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index 5838d47cf8..54611bf36d 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -413,19 +413,6 @@ void SDL_RemoveMouse(SDL_MouseID mouseID, bool send_event) } } -void SDL_SetMouseName(SDL_MouseID mouseID, const char *name) -{ - SDL_assert(mouseID != 0); - - const int mouse_index = SDL_GetMouseIndex(mouseID); - - if (mouse_index >= 0) { - SDL_MouseInstance *instance = &SDL_mice[mouse_index]; - SDL_free(instance->name); - instance->name = SDL_strdup(name ? name : ""); - } -} - bool SDL_HasMouse(void) { return (SDL_mouse_count > 0); diff --git a/src/events/SDL_mouse_c.h b/src/events/SDL_mouse_c.h index 0bc913b94e..c25974ba82 100644 --- a/src/events/SDL_mouse_c.h +++ b/src/events/SDL_mouse_c.h @@ -169,9 +169,6 @@ extern void SDL_AddMouse(SDL_MouseID mouseID, const char *name, bool send_event) // A mouse has been removed from the system extern void SDL_RemoveMouse(SDL_MouseID mouseID, bool send_event); -// Set or update the name of a mouse instance. -extern void SDL_SetMouseName(SDL_MouseID mouseID, const char *name); - // Get the mouse state structure extern SDL_Mouse *SDL_GetMouse(void); diff --git a/src/events/SDL_touch.c b/src/events/SDL_touch.c index bf3cc02354..e825117c82 100644 --- a/src/events/SDL_touch.c +++ b/src/events/SDL_touch.c @@ -205,16 +205,6 @@ int SDL_AddTouch(SDL_TouchID touchID, SDL_TouchDeviceType type, const char *name return index; } -// Set or update the name of a touch. -void SDL_SetTouchName(SDL_TouchID id, const char *name) -{ - SDL_Touch *touch = SDL_GetTouch(id); - if (touch) { - SDL_free(touch->name); - touch->name = SDL_strdup(name ? name : ""); - } -} - static bool SDL_AddFinger(SDL_Touch *touch, SDL_FingerID fingerid, float x, float y, float pressure) { SDL_Finger *finger; diff --git a/src/events/SDL_touch_c.h b/src/events/SDL_touch_c.h index e46ba68197..db2d64b85f 100644 --- a/src/events/SDL_touch_c.h +++ b/src/events/SDL_touch_c.h @@ -42,9 +42,6 @@ extern bool SDL_TouchDevicesAvailable(void); // Add a touch, returning the index of the touch, or -1 if there was an error. extern int SDL_AddTouch(SDL_TouchID id, SDL_TouchDeviceType type, const char *name); -// Set or update the name of a touch. -extern void SDL_SetTouchName(SDL_TouchID id, const char *name); - // Get the touch with a given id extern SDL_Touch *SDL_GetTouch(SDL_TouchID id); diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c index 2710928c81..5f640321eb 100644 --- a/src/video/wayland/SDL_waylandevents.c +++ b/src/video/wayland/SDL_waylandevents.c @@ -2352,25 +2352,9 @@ static void seat_handle_capabilities(void *data, struct wl_seat *wl_seat, enum w static void seat_handle_name(void *data, struct wl_seat *wl_seat, const char *name) { SDL_WaylandSeat *seat = (SDL_WaylandSeat *)data; - char name_fmt[256]; if (name && *name != '\0') { seat->name = SDL_strdup(name); - - if (seat->keyboard.wl_keyboard) { - SDL_snprintf(name_fmt, sizeof(name_fmt), "%s (%s)", WAYLAND_DEFAULT_KEYBOARD_NAME, seat->name); - SDL_SetKeyboardName(seat->keyboard.sdl_id, name_fmt); - } - - if (seat->pointer.wl_pointer) { - SDL_snprintf(name_fmt, sizeof(name_fmt), "%s (%s)", WAYLAND_DEFAULT_POINTER_NAME, seat->name); - SDL_SetMouseName(seat->pointer.sdl_id, name_fmt); - } - - if (seat->touch.wl_touch) { - SDL_snprintf(name_fmt, sizeof(name_fmt), "%s (%s)", WAYLAND_DEFAULT_TOUCH_NAME, seat->name); - SDL_SetTouchName((SDL_TouchID)(uintptr_t)seat->touch.wl_touch, name_fmt); - } } }