From e63649279186e119614b9ca892bcfa27e6af8337 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Tue, 26 Sep 2006 20:46:17 +0000 Subject: Fixed remote contrast settings. Maybe'll get some build errors here. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11071 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'apps/settings.c') diff --git a/apps/settings.c b/apps/settings.c index 4746c22c87..ee7fa36d39 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -302,7 +302,8 @@ static const struct bit_entry rtc_bits[] = #ifdef HAVE_REMOTE_LCD /* remote lcd */ - {6, S_O(remote_contrast), 42, "remote contrast", NULL }, + {6, S_O(remote_contrast), DEFAULT_REMOTE_CONTRAST_SETTING, + "remote contrast", NULL }, {1, S_O(remote_invert), false, "remote invert", off_on }, {1, S_O(remote_flip_display), false, "remote flip display", off_on }, {5, S_O(remote_backlight_timeout), 6, "remote backlight timeout", @@ -1365,11 +1366,18 @@ void settings_load(int which) #ifdef HAVE_RECORDING global_settings.recscreen_on = false; #endif + #ifdef HAVE_LCD_CONTRAST - if ( global_settings.contrast < MIN_CONTRAST_SETTING ) + if ( global_settings.contrast < MIN_CONTRAST_SETTING || + global_settings.contrast > MAX_CONTRAST_SETTING ) global_settings.contrast = lcd_default_contrast(); #endif +#ifdef HAVE_LCD_REMOTE + if (global_settings.remote_contrast < MIN_REMOTE_CONTRAST_SETTING || + global_settings.remote_contrast > MAX_REMOTE_CONTRAST_SETTING ) + global_settings.remote_contrast = lcd_remote_default_contrast(); +#endif i = 0xb8; strncpy((char *)global_settings.wps_file, (char *)&config_block[i], MAX_FILENAME); -- cgit v1.2.3