# SDL: The backlight event is "change", not "add" or "remove"

**URL:** <https://discourse.libsdl.org/t/sdl-the-backlight-event-is-change-not-add-or-remove/36986>\
**Category:** SDL Commits\
**Created:** [June 10, 2022, 7:44pm UTC](https://discourse.libsdl.org/t/sdl-the-backlight-event-is-change-not-add-or-remove/36986 "2022-06-10T19:44:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [June 10, 2022, 7:44pm UTC](https://discourse.libsdl.org/t/sdl-the-backlight-event-is-change-not-add-or-remove/36986/1 "2022-06-10T19:44:02Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/ce5763230bae4bab9e39634100cc40a7d10433ff>

```diff
From ce5763230bae4bab9e39634100cc40a7d10433ff Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 10 Jun 2022 12:42:45 -0700
Subject: [PATCH] The backlight event is "change", not "add" or "remove"

---
 src/hidapi/SDL_hidapi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/hidapi/SDL_hidapi.c b/src/hidapi/SDL_hidapi.c
index fa8e56ea106..d65611779de 100644
--- a/src/hidapi/SDL_hidapi.c
+++ b/src/hidapi/SDL_hidapi.c
@@ -416,10 +416,7 @@ 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) {
- const char *subsystem = usyms->udev_device_get_subsystem(pUdevDevice);
- if (!subsystem || SDL_strcmp(subsystem, "backlight") != 0) {
- ++SDL_HIDAPI_discovery.m_unDeviceChangeCounter;
- }
+ ++SDL_HIDAPI_discovery.m_unDeviceChangeCounter;
                     }
                     usyms->udev_device_unref(pUdevDevice);
                 }

```
