Don't trigger device notifications when Steam Deck backlight changes

This commit is contained in:
Sam Lantinga 2022-05-26 20:45:13 -07:00
parent 5968f3d828
commit bef9f2b2c4
1 changed files with 4 additions and 1 deletions

View File

@ -416,7 +416,10 @@ HIDAPI_UpdateDiscovery()
const char *action = NULL;
action = usyms->udev_device_get_action(pUdevDevice);
if (!action || SDL_strcmp(action, "add") == 0 || SDL_strcmp(action, "remove") == 0) {
++SDL_HIDAPI_discovery.m_unDeviceChangeCounter;
const char *subsystem = usyms->udev_device_get_subsystem(pUdevDevice);
if (!subsystem || SDL_strcmp(subsystem, "backlight") != 0) {
++SDL_HIDAPI_discovery.m_unDeviceChangeCounter;
}
}
usyms->udev_device_unref(pUdevDevice);
}