joystick: remove dead udev code

SDL_USE_LIBUDEV is never even defined here and SDL_hid_init() already does this.
This commit is contained in:
Cameron Gutman 2025-02-15 14:14:12 -06:00
parent ba45256940
commit 4a9b579195
1 changed files with 0 additions and 18 deletions

View File

@ -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");
}