summaryrefslogtreecommitdiffstats
path: root/minuitwrp/graphics_fbdev.cpp
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 /minuitwrp/graphics_fbdev.cpp
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
Diffstat (limited to 'minuitwrp/graphics_fbdev.cpp')
-rw-r--r--minuitwrp/graphics_fbdev.cpp10
1 files changed, 10 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;