summaryrefslogtreecommitdiff
path: root/firmware/backlight.c
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-10-21 23:36:09 +0200
committerWilliam Wilgus <me.theuser@yahoo.com>2021-12-08 22:26:38 -0500
commit7e0e4fe888eba8133a753bb2abc748b0c404e9f5 (patch)
tree81bb6a5aecb8a2dee19ff03bd649010d7da87d27 /firmware/backlight.c
parent5433ea540555f18d3986c5067c6f26ddf497bd9b (diff)
downloadrockbox-7e0e4fe888eba8133a753bb2abc748b0c404e9f5.tar.gz
rockbox-7e0e4fe888eba8133a753bb2abc748b0c404e9f5.zip
Add setting to hide shutdown message
Also keeps display from lighting up before shutdown, which reduces distractions, especially at night and when the sleep timer is used by allowing the screen to remain dark. Change-Id: I1c2d1966f6fb9766532adf01e8828876a871857f
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r--firmware/backlight.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index e8a71af12c..1284db4659 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -21,6 +21,9 @@
21 * 21 *
22 ****************************************************************************/ 22 ****************************************************************************/
23#include "config.h" 23#include "config.h"
24#if !defined(BOOTLOADER)
25#include "settings.h"
26#endif
24#include <stdlib.h> 27#include <stdlib.h>
25#include "cpu.h" 28#include "cpu.h"
26#include "kernel.h" 29#include "kernel.h"
@@ -667,7 +670,11 @@ void backlight_thread(void)
667 670
668 case SYS_POWEROFF: /* Lock backlight on poweroff so it doesn't */ 671 case SYS_POWEROFF: /* Lock backlight on poweroff so it doesn't */
669 locked = true; /* go off before power is actually cut. */ 672 locked = true; /* go off before power is actually cut. */
670 /* fall through */ 673#if !defined(BOOTLOADER)
674 if (!global_settings.show_shutdown_message)
675 break;
676#endif
677 /* else fall through */
671#if CONFIG_CHARGING 678#if CONFIG_CHARGING
672 case SYS_CHARGER_CONNECTED: 679 case SYS_CHARGER_CONNECTED:
673 case SYS_CHARGER_DISCONNECTED: 680 case SYS_CHARGER_DISCONNECTED: