diff options
-rw-r--r-- | minuitwrp/graphics_fbdev.cpp | 10 | ||||
-rw-r--r-- | minuitwrp/graphics_overlay.cpp | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/minuitwrp/graphics_fbdev.cpp b/minuitwrp/graphics_fbdev.cpp index 24294be0c..dc2bb2fdc 100644 --- a/minuitwrp/graphics_fbdev.cpp +++ b/minuitwrp/graphics_fbdev.cpp @@ -73,6 +73,16 @@ static void fbdev_blank(minui_backend* backend __unused, bool blank) } write(fd, blank ? "000" : brightness, 3); close(fd); + +#ifdef TW_SECONDARY_BRIGHTNESS_PATH + fd = open(TW_SECONDARY_BRIGHTNESS_PATH, O_RDWR); + if (fd < 0) { + perror("cannot open LCD backlight 2"); + return; + } + write(fd, blank ? "000" : brightness, 3); + close(fd); +#endif #else #ifndef TW_NO_SCREEN_BLANK int ret; diff --git a/minuitwrp/graphics_overlay.cpp b/minuitwrp/graphics_overlay.cpp index 5d759f6d4..84ea6e0ea 100644 --- a/minuitwrp/graphics_overlay.cpp +++ b/minuitwrp/graphics_overlay.cpp @@ -164,6 +164,16 @@ static void overlay_blank(minui_backend* backend __unused, bool blank) } write(fd, blank ? "000" : brightness, 3); close(fd); + +#ifdef TW_SECONDARY_BRIGHTNESS_PATH + fd = open(TW_SECONDARY_BRIGHTNESS_PATH, O_RDWR); + if (fd < 0) { + perror("cannot open LCD backlight 2"); + return; + } + write(fd, blank ? "000" : brightness, 3); + close(fd); +#endif #else int ret; |