From e5a4f093632739160365d699b54e94c6772c6657 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 13 Jan 2025 10:22:10 -0800 Subject: [PATCH] Call SDL_UDEV_Quit() if we don't end up using it --- src/joystick/linux/SDL_sysjoystick.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c index fe8fca9c9d..8fbaca99d0 100644 --- a/src/joystick/linux/SDL_sysjoystick.c +++ b/src/joystick/linux/SDL_sysjoystick.c @@ -1036,6 +1036,10 @@ static bool LINUX_JoystickInit(void) "udev init failed, disabling udev integration"); enumeration_method = ENUMERATION_FALLBACK; } + } else { + if (udev_initialized) { + SDL_UDEV_Quit(); + } } #endif