diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings.c | 14 | ||||
-rw-r--r-- | apps/settings.h | 3 | ||||
-rw-r--r-- | apps/settings_menu.c | 10 |
3 files changed, 25 insertions, 2 deletions
diff --git a/apps/settings.c b/apps/settings.c index 4487361e8d..8c4e3dea71 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -297,11 +297,18 @@ static const struct bit_entry rtc_bits[] = | |||
297 | #endif | 297 | #endif |
298 | 298 | ||
299 | #ifdef CONFIG_BACKLIGHT | 299 | #ifdef CONFIG_BACKLIGHT |
300 | {1, S_O(bl_filter_first_keypress), | ||
300 | #ifdef HAVE_LCD_COLOR | 301 | #ifdef HAVE_LCD_COLOR |
301 | {1, S_O(bl_filter_first_keypress), true, "backlight filters first keypress", off_on }, | 302 | true, |
302 | #else | 303 | #else |
303 | {1, S_O(bl_filter_first_keypress), false, "backlight filters first keypress", off_on }, | 304 | false, |
304 | #endif | 305 | #endif |
306 | "backlight filters first keypress", off_on }, | ||
307 | #ifdef HAVE_REMOTE_LCD | ||
308 | {1, S_O(remote_bl_filter_first_keypress), false, | ||
309 | "backlight filters first remote keypress", off_on }, | ||
310 | #endif | ||
311 | |||
305 | #endif | 312 | #endif |
306 | 313 | ||
307 | /* new stuff to be added here */ | 314 | /* new stuff to be added here */ |
@@ -1126,6 +1133,9 @@ void settings_apply(void) | |||
1126 | 1133 | ||
1127 | #ifdef CONFIG_BACKLIGHT | 1134 | #ifdef CONFIG_BACKLIGHT |
1128 | set_backlight_filter_keypress(global_settings.bl_filter_first_keypress); | 1135 | set_backlight_filter_keypress(global_settings.bl_filter_first_keypress); |
1136 | #ifdef HAVE_REMOTE_LCD | ||
1137 | set_remote_backlight_filter_keypress(global_settings.remote_bl_filter_first_keypress); | ||
1138 | #endif | ||
1129 | #endif | 1139 | #endif |
1130 | } | 1140 | } |
1131 | 1141 | ||
diff --git a/apps/settings.h b/apps/settings.h index 2fd52aea9e..424341f340 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -475,6 +475,9 @@ struct user_settings | |||
475 | 475 | ||
476 | #ifdef CONFIG_BACKLIGHT | 476 | #ifdef CONFIG_BACKLIGHT |
477 | bool bl_filter_first_keypress; /* filter first keypress when dark? */ | 477 | bool bl_filter_first_keypress; /* filter first keypress when dark? */ |
478 | #ifdef HAVE_REMOTE_LCD | ||
479 | bool remote_bl_filter_first_keypress; /* filter first remote keypress when remote dark? */ | ||
480 | #endif | ||
478 | #endif | 481 | #endif |
479 | }; | 482 | }; |
480 | 483 | ||
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index e5aa7f44d7..ab0e21d098 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c | |||
@@ -1082,6 +1082,15 @@ static bool set_bl_filter_first_keypress(void) | |||
1082 | set_backlight_filter_keypress(global_settings.bl_filter_first_keypress); | 1082 | set_backlight_filter_keypress(global_settings.bl_filter_first_keypress); |
1083 | return result; | 1083 | return result; |
1084 | } | 1084 | } |
1085 | #ifdef HAVE_REMOTE_LCD | ||
1086 | static bool set_remote_bl_filter_first_keypress(void) | ||
1087 | { | ||
1088 | bool result = set_bool( str(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS), | ||
1089 | &global_settings.remote_bl_filter_first_keypress ); | ||
1090 | set_remote_backlight_filter_keypress(global_settings.remote_bl_filter_first_keypress); | ||
1091 | return result; | ||
1092 | } | ||
1093 | #endif | ||
1085 | #endif | 1094 | #endif |
1086 | 1095 | ||
1087 | static bool ff_rewind_accel(void) | 1096 | static bool ff_rewind_accel(void) |
@@ -1694,6 +1703,7 @@ static bool lcd_remote_settings_menu(void) | |||
1694 | remote_backlight_timer_plugged }, | 1703 | remote_backlight_timer_plugged }, |
1695 | #endif | 1704 | #endif |
1696 | { ID2P(LANG_CAPTION_BACKLIGHT), remote_caption_backlight }, | 1705 | { ID2P(LANG_CAPTION_BACKLIGHT), remote_caption_backlight }, |
1706 | { ID2P(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS), set_remote_bl_filter_first_keypress }, | ||
1697 | { ID2P(LANG_CONTRAST), remote_contrast }, | 1707 | { ID2P(LANG_CONTRAST), remote_contrast }, |
1698 | { ID2P(LANG_INVERT), remote_invert }, | 1708 | { ID2P(LANG_INVERT), remote_invert }, |
1699 | { ID2P(LANG_FLIP_DISPLAY), remote_flip_display }, | 1709 | { ID2P(LANG_FLIP_DISPLAY), remote_flip_display }, |