diff options
author | Matt Mower <mowerm@gmail.com> | 2014-01-20 23:14:25 +0100 |
---|---|---|
committer | Jason Riordan <jriordan001@gmail.com> | 2014-02-06 02:20:46 +0100 |
commit | 4a5db2d8b4a24c9fa650d2d439bf0f4ff52afef6 (patch) | |
tree | ff69a387e053d81cf34ec00aada1ef7ff2723367 /minui/graphics.c | |
parent | Fix error message on split backups (diff) | |
download | android_bootable_recovery-4a5db2d8b4a24c9fa650d2d439bf0f4ff52afef6.tar android_bootable_recovery-4a5db2d8b4a24c9fa650d2d439bf0f4ff52afef6.tar.gz android_bootable_recovery-4a5db2d8b4a24c9fa650d2d439bf0f4ff52afef6.tar.bz2 android_bootable_recovery-4a5db2d8b4a24c9fa650d2d439bf0f4ff52afef6.tar.lz android_bootable_recovery-4a5db2d8b4a24c9fa650d2d439bf0f4ff52afef6.tar.xz android_bootable_recovery-4a5db2d8b4a24c9fa650d2d439bf0f4ff52afef6.tar.zst android_bootable_recovery-4a5db2d8b4a24c9fa650d2d439bf0f4ff52afef6.zip |
Diffstat (limited to '')
-rw-r--r-- | minui/graphics.c | 8 |
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; |