summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrianDC <radian.dc@gmail.com>2016-02-07 03:44:44 +0100
committerDees Troy <dees_troy@teamw.in>2016-02-19 04:01:57 +0100
commit2948b6f39336bf247e28f06a96436cba7b9277b7 (patch)
tree7ec3541109ae9cfee3d832cfddfcfe848b8ef0b9
parentFix OEM compile (diff)
downloadandroid_bootable_recovery-2948b6f39336bf247e28f06a96436cba7b9277b7.tar
android_bootable_recovery-2948b6f39336bf247e28f06a96436cba7b9277b7.tar.gz
android_bootable_recovery-2948b6f39336bf247e28f06a96436cba7b9277b7.tar.bz2
android_bootable_recovery-2948b6f39336bf247e28f06a96436cba7b9277b7.tar.lz
android_bootable_recovery-2948b6f39336bf247e28f06a96436cba7b9277b7.tar.xz
android_bootable_recovery-2948b6f39336bf247e28f06a96436cba7b9277b7.tar.zst
android_bootable_recovery-2948b6f39336bf247e28f06a96436cba7b9277b7.zip
-rw-r--r--minuitwrp/graphics_fbdev.cpp10
-rw-r--r--minuitwrp/graphics_overlay.cpp10
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;