summaryrefslogtreecommitdiffstats
path: root/minui/graphics.c
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2014-02-06 20:09:42 +0100
committerGerrit Code Review <gerrit2@gerrit>2014-02-06 20:09:42 +0100
commit5760002161917aa458ecbcd9082d660e2cf0272d (patch)
tree35fd7af3677b6f9a3a07f04cb35fed5cd051f592 /minui/graphics.c
parentMerge "Don't switch between fast and normal scroll during drag in listviews" into android-4.4 (diff)
parentminui: adapt backlight blanking commit to TWRP (diff)
downloadandroid_bootable_recovery-5760002161917aa458ecbcd9082d660e2cf0272d.tar
android_bootable_recovery-5760002161917aa458ecbcd9082d660e2cf0272d.tar.gz
android_bootable_recovery-5760002161917aa458ecbcd9082d660e2cf0272d.tar.bz2
android_bootable_recovery-5760002161917aa458ecbcd9082d660e2cf0272d.tar.lz
android_bootable_recovery-5760002161917aa458ecbcd9082d660e2cf0272d.tar.xz
android_bootable_recovery-5760002161917aa458ecbcd9082d660e2cf0272d.tar.zst
android_bootable_recovery-5760002161917aa458ecbcd9082d660e2cf0272d.zip
Diffstat (limited to '')
-rw-r--r--minui/graphics.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/minui/graphics.c b/minui/graphics.c
index ff3967496..00fbb1eef 100644
--- a/minui/graphics.c
+++ b/minui/graphics.c
@@ -437,15 +437,17 @@ gr_pixel *gr_fb_data(void)
void gr_fb_blank(bool blank)
{
-#ifdef RECOVERY_LCD_BACKLIGHT_PATH
+#if defined(TW_NO_SCREEN_BLANK) && defined(TW_BRIGHTNESS_PATH) && defined(TW_MAX_BRIGHTNESS)
int fd;
+ char brightness[4];
+ snprintf(brightness, 4, "%03d", TW_MAX_BRIGHTNESS/2);
- fd = open(RECOVERY_LCD_BACKLIGHT_PATH, O_RDWR);
+ fd = open(TW_BRIGHTNESS_PATH, O_RDWR);
if (fd < 0) {
perror("cannot open LCD backlight");
return;
}
- write(fd, blank ? "000" : "127", 3);
+ write(fd, blank ? "000" : brightness, 3);
close(fd);
#else
int ret;