summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorSebastian Leonhardt <sebastian.leonhardt@web.de>2019-06-25 22:32:39 +0200
committerSebastian Leonhardt <sebastian.leonhardt@web.de>2019-06-27 14:19:05 +0200
commit3e504c3dcd16ec93fb70b10c4f5a361633d7a77b (patch)
treeb39a57140b94fa8954c1dcdf8f7a564ffe01ecad /firmware
parent7b118eccac021934f7731396767dd0b50320acc6 (diff)
downloadrockbox-3e504c3dcd16ec93fb70b10c4f5a361633d7a77b.tar.gz
rockbox-3e504c3dcd16ec93fb70b10c4f5a361633d7a77b.tar.bz2
rockbox-3e504c3dcd16ec93fb70b10c4f5a361633d7a77b.zip
Fix reversal of "always/never" in "LCD setting > Sleep (After Backlight Off)"
The bug was introduced in a06d9c8. The patch also fixes some (more or less) related obsolete comments. Change-Id: I5e491d64574c37cdbc46b146d7cfc555d86b9a11
Diffstat (limited to 'firmware')
-rw-r--r--firmware/backlight.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index caff55ce5e..e8a71af12c 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -209,15 +209,18 @@ static void backlight_lcd_sleep_countdown(bool start)
}
/* Start LCD sleep countdown */
- if (lcd_sleep_timeout < 0)
+ if (lcd_sleep_timeout <= 0)
{
- lcd_sleep_timer = 0; /* Setting == Always */
- /* Ensure lcd_sleep() is called from backlight_thread() */
+ lcd_sleep_timer = 0;
+ if (lcd_sleep_timeout == 0) /* Setting == Always */
+ {
+ /* Ensure lcd_sleep() is called from backlight_thread() */
#if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_PWM)
- queue_post(&backlight_queue, LCD_SLEEP, 0);
+ queue_post(&backlight_queue, LCD_SLEEP, 0);
#else
- lcd_sleep();
+ lcd_sleep();
#endif
+ }
}
else
{