mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
evdev: fixed devices not being removed on disconnect
This commit is contained in:
@@ -487,9 +487,13 @@ static void device_event(SDL_UDEV_deviceevent type, struct udev_device *dev)
|
||||
return;
|
||||
}
|
||||
|
||||
devclass = device_class(dev);
|
||||
if (!devclass) {
|
||||
return;
|
||||
if (type == SDL_UDEV_DEVICEADDED) {
|
||||
devclass = device_class(dev);
|
||||
if (!devclass) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// The device has been removed, the class isn't available
|
||||
}
|
||||
|
||||
// Process callbacks
|
||||
|
Reference in New Issue
Block a user