summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-12-18 10:29:47 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-12-18 10:29:47 +0000
commitfee861747999d358e9f5f58841697c09c9ea9b4f (patch)
treeffd51ea2ca9aa7fd0e330fec6fde384d925e9e13 /apps
parent417753da7d9e128971bd0032d56b495845c1c805 (diff)
downloadrockbox-fee861747999d358e9f5f58841697c09c9ea9b4f.tar.gz
rockbox-fee861747999d358e9f5f58841697c09c9ea9b4f.tar.bz2
rockbox-fee861747999d358e9f5f58841697c09c9ea9b4f.zip
multiple choice configuration CONFIG_BACKLIGHT instead of HAVE_BACKLIGHT, allows better control of how to do this per model
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5491 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/settings.c8
-rw-r--r--apps/settings_menu.c14
-rw-r--r--apps/wps-display.c2
3 files changed, 15 insertions, 9 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 7ca3820016..ff9c57d136 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -182,12 +182,14 @@ static const struct bit_entry rtc_bits[] =
{2, S_O(repeat_mode), REPEAT_ALL, "repeat", "off,all,one" },
/* LCD */
{6, S_O(contrast), 40, "contrast", NULL },
-#ifdef HAVE_BACKLIGHT
+#ifdef CONFIG_BACKLIGHT
+#ifdef HAVE_CHARGING
{1, S_O(backlight_on_when_charging), false,
"backlight when plugged", off_on },
+#endif
{5, S_O(backlight_timeout), 5, "backlight timeout",
"off,on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90" },
-#endif
+#endif /* CONFIG_BACKLIGHT */
#ifdef HAVE_LCD_BITMAP
{1, S_O(invert), false, "invert", off_on },
{1, S_O(flip_display), false, "flip display", off_on },
@@ -247,7 +249,7 @@ static const struct bit_entry hd_bits[] =
/* # of bits, offset+size, default, .cfg name, .cfg values */
/* more display */
-#ifdef HAVE_BACKLIGHT
+#ifdef CONFIG_BACKLIGHT
{1, S_O(caption_backlight), false, "caption backlight", off_on },
#endif
{4, S_O(scroll_speed), 9, "scroll speed", NULL }, /* 0...15 */
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index c61352b1cc..eae39f905f 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -77,7 +77,7 @@ static bool contrast(void)
MAX_CONTRAST_SETTING );
}
-#ifdef HAVE_BACKLIGHT
+#ifdef CONFIG_BACKLIGHT
static bool caption_backlight(void)
{
bool rc = set_bool( str(LANG_CAPTION_BACKLIGHT),
@@ -575,7 +575,8 @@ static bool useMRB(void)
names, 3, NULL );
}
-#ifdef HAVE_BACKLIGHT
+#ifdef CONFIG_BACKLIGHT
+#ifdef HAVE_CHARGING
static bool backlight_on_when_charging(void)
{
bool result = set_bool(str(LANG_BACKLIGHT_ON_WHEN_CHARGING),
@@ -583,6 +584,7 @@ static bool backlight_on_when_charging(void)
backlight_set_on_when_charging(global_settings.backlight_on_when_charging);
return result;
}
+#endif
static bool backlight_timer(void)
{
@@ -610,7 +612,7 @@ static bool backlight_timer(void)
return set_option(str(LANG_BACKLIGHT), &global_settings.backlight_timeout,
INT, names, 19, backlight_set_timeout );
}
-#endif /* HAVE_BACKLIGHT */
+#endif /* CONFIG_BACKLIGHT */
static bool poweroff_idle_timer(void)
{
@@ -1162,11 +1164,13 @@ static bool lcd_settings_menu(void)
bool result;
static const struct menu_item items[] = {
-#ifdef HAVE_BACKLIGHT
+#ifdef CONFIG_BACKLIGHT
{ ID2P(LANG_BACKLIGHT), backlight_timer },
+#ifdef HAVE_CHARGING
{ ID2P(LANG_BACKLIGHT_ON_WHEN_CHARGING), backlight_on_when_charging },
- { ID2P(LANG_CAPTION_BACKLIGHT), caption_backlight },
#endif
+ { ID2P(LANG_CAPTION_BACKLIGHT), caption_backlight },
+#endif /* CONFIG_BACKLIGHT */
{ ID2P(LANG_CONTRAST), contrast },
#ifdef HAVE_LCD_BITMAP
{ ID2P(LANG_INVERT), invert },
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 90fec56001..a261f21a5d 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -987,7 +987,7 @@ bool wps_refresh(struct mp3entry* id3,
peak_meter_enabled = enable_pm;
#endif
-#if defined(HAVE_BACKLIGHT) && !defined(SIMULATOR)
+#if defined(CONFIG_BACKLIGHT) && !defined(SIMULATOR)
if (global_settings.caption_backlight && id3) {
/* turn on backlight n seconds before track ends, and turn it off n
seconds into the new track. n == backlight_timeout, or 5s */