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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
devclass = device_class(dev);
|
if (type == SDL_UDEV_DEVICEADDED) {
|
||||||
if (!devclass) {
|
devclass = device_class(dev);
|
||||||
return;
|
if (!devclass) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// The device has been removed, the class isn't available
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process callbacks
|
// Process callbacks
|
||||||
|
|||||||
Reference in New Issue
Block a user