summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-05-14 19:29:25 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-05-14 19:29:25 +0000
commit009cebeab263085d142c413386f1fc7760792b6d (patch)
treeb78e716cd627ad53bad8a51cad007b3a2a1fa421 /apps
parentbdc6e624bc7dd9c798a024a951b3da0dabf1ddc4 (diff)
downloadrockbox-009cebeab263085d142c413386f1fc7760792b6d.tar.gz
rockbox-009cebeab263085d142c413386f1fc7760792b6d.zip
Straigten-out lcd sleeping on Gigabeat F/X. Add a service function to backlight.c to handle lcd sleep timer. Make HAVE_LCD_SLEEP useable without a setting and use HAVE_LCD_SLEEP_SETTING when a setting is available in addition to HCD_HAVE_SLEEP. If a setting isn't used, the target must define the timeout to be used in the config.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17505 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/menus/display_menu.c4
-rw-r--r--apps/settings.c2
-rw-r--r--apps/settings.h2
-rw-r--r--apps/settings_list.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c
index 57d2f72be5..5ba8c2ecb1 100644
--- a/apps/menus/display_menu.c
+++ b/apps/menus/display_menu.c
@@ -94,7 +94,7 @@ MENUITEM_SETTING(backlight_fade_out, &global_settings.backlight_fade_out, NULL);
MENUITEM_SETTING(bl_filter_first_keypress,
&global_settings.bl_filter_first_keypress,
filterfirstkeypress_callback);
-#ifdef HAVE_LCD_SLEEP
+#ifdef HAVE_LCD_SLEEP_SETTING
MENUITEM_SETTING(lcd_sleep_after_backlight_off,
&global_settings.lcd_sleep_after_backlight_off, NULL);
#endif
@@ -130,7 +130,7 @@ MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU),
,&backlight_fade_in, &backlight_fade_out
# endif
,&bl_filter_first_keypress
-# ifdef HAVE_LCD_SLEEP
+# ifdef HAVE_LCD_SLEEP_SETTING
,&lcd_sleep_after_backlight_off
# endif
# ifdef HAVE_BACKLIGHT_BRIGHTNESS
diff --git a/apps/settings.c b/apps/settings.c
index 9fb1f12d0d..1a857eacd8 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -924,7 +924,7 @@ void settings_apply(bool read_disk)
#ifdef HAS_BUTTON_HOLD
backlight_set_on_button_hold(global_settings.backlight_on_button_hold);
#endif
-#ifdef HAVE_LCD_SLEEP
+#ifdef HAVE_LCD_SLEEP_SETTING
lcd_set_sleep_after_backlight_off(global_settings.lcd_sleep_after_backlight_off);
#endif
#endif /* HAVE_BACKLIGHT */
diff --git a/apps/settings.h b/apps/settings.h
index 4ade11b11d..9a9169a74f 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -646,7 +646,7 @@ struct user_settings
int backlight_on_button_hold; /* what to do with backlight when hold
switch is on */
#endif
-#ifdef HAVE_LCD_SLEEP
+#ifdef HAVE_LCD_SLEEP_SETTING
int lcd_sleep_after_backlight_off; /* when to put lcd to sleep after backlight
has turned off */
#endif
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 2ef90afc94..a08639996c 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1126,7 +1126,7 @@ const struct settings_list settings[] = {
ID2P(LANG_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
#endif
-#ifdef HAVE_LCD_SLEEP
+#ifdef HAVE_LCD_SLEEP_SETTING
STRINGCHOICE_SETTING(0, lcd_sleep_after_backlight_off,
LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF, 3,
"lcd sleep after backlight off",
@@ -1137,7 +1137,7 @@ const struct settings_list settings[] = {
TALK_ID(20, UNIT_SEC), TALK_ID(30, UNIT_SEC),
TALK_ID(45, UNIT_SEC),TALK_ID(60, UNIT_SEC),
TALK_ID(90, UNIT_SEC)),
-#endif
+#endif /* HAVE_LCD_SLEEP_SETTING */
#endif /* HAVE_BACKLIGHT */
OFFON_SETTING(0, hold_lr_for_scroll_in_list, -1, true,