mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-06 07:20:48 +00:00
The backlight event is "change", not "add" or "remove"
This commit is contained in:
parent
68544be44b
commit
ce5763230b
1 changed files with 1 additions and 4 deletions
|
@ -416,10 +416,7 @@ HIDAPI_UpdateDiscovery()
|
||||||
const char *action = NULL;
|
const char *action = NULL;
|
||||||
action = usyms->udev_device_get_action(pUdevDevice);
|
action = usyms->udev_device_get_action(pUdevDevice);
|
||||||
if (!action || SDL_strcmp(action, "add") == 0 || SDL_strcmp(action, "remove") == 0) {
|
if (!action || SDL_strcmp(action, "add") == 0 || SDL_strcmp(action, "remove") == 0) {
|
||||||
const char *subsystem = usyms->udev_device_get_subsystem(pUdevDevice);
|
++SDL_HIDAPI_discovery.m_unDeviceChangeCounter;
|
||||||
if (!subsystem || SDL_strcmp(subsystem, "backlight") != 0) {
|
|
||||||
++SDL_HIDAPI_discovery.m_unDeviceChangeCounter;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
usyms->udev_device_unref(pUdevDevice);
|
usyms->udev_device_unref(pUdevDevice);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue