From 4a9b5791958115f5bdac9abb3369eaaad67c4071 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 15 Feb 2025 14:14:12 -0600 Subject: [PATCH] joystick: remove dead udev code SDL_USE_LIBUDEV is never even defined here and SDL_hid_init() already does this. --- src/joystick/hidapi/SDL_hidapijoystick.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/joystick/hidapi/SDL_hidapijoystick.c b/src/joystick/hidapi/SDL_hidapijoystick.c index 6885f8b331..566eae4a9d 100644 --- a/src/joystick/hidapi/SDL_hidapijoystick.c +++ b/src/joystick/hidapi/SDL_hidapijoystick.c @@ -533,24 +533,6 @@ static bool HIDAPI_JoystickInit(void) return true; } -#ifdef SDL_USE_LIBUDEV - if (linux_enumeration_method == ENUMERATION_UNSET) { - if (!SDL_GetHintBoolean(SDL_HINT_HIDAPI_UDEV, true)) { - SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, - "udev disabled by SDL_HINT_HIDAPI_UDEV"); - linux_enumeration_method = ENUMERATION_FALLBACK; - } else if (SDL_GetSandbox() != SDL_SANDBOX_NONE) { - SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, - "Container detected, disabling HIDAPI udev integration"); - linux_enumeration_method = ENUMERATION_FALLBACK; - } else { - SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, - "Using udev for HIDAPI joystick device discovery"); - linux_enumeration_method = ENUMERATION_LIBUDEV; - } - } -#endif - if (SDL_hid_init() < 0) { return SDL_SetError("Couldn't initialize hidapi"); }