From da5fb18bca90ec09b99f28186787d10378a92109 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Fri, 24 Mar 2006 13:47:24 +0000 Subject: New option: First keypress enables backlight only. Patch #2920 by Nicolas Pennequin. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9228 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings_menu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'apps/settings_menu.c') diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 6e8d62191f..70703a23ce 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -1046,6 +1046,15 @@ static bool set_party_mode(void) return set_bool( str(LANG_PARTY_MODE), &global_settings.party_mode ); } +#ifdef CONFIG_BACKLIGHT +static bool set_bl_filter_first_keypress(void) +{ + bool result = set_bool( str(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS), + &global_settings.bl_filter_first_keypress ); + set_backlight_filter_keypress(global_settings.bl_filter_first_keypress); + return result; +} +#endif static bool ff_rewind_accel(void) { @@ -1621,6 +1630,7 @@ static bool lcd_settings_menu(void) #ifdef HAVE_BACKLIGHT_BRIGHTNESS { ID2P(LANG_BRIGHTNESS), brightness }, #endif + { ID2P(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS), set_bl_filter_first_keypress }, #endif /* CONFIG_BACKLIGHT */ { ID2P(LANG_CONTRAST), contrast }, #ifdef HAVE_LCD_BITMAP -- cgit v1.2.3