diff options
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 12 |
1 files changed, 10 insertions, 2 deletions
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[] = | |||
302 | 302 | ||
303 | #ifdef HAVE_REMOTE_LCD | 303 | #ifdef HAVE_REMOTE_LCD |
304 | /* remote lcd */ | 304 | /* remote lcd */ |
305 | {6, S_O(remote_contrast), 42, "remote contrast", NULL }, | 305 | {6, S_O(remote_contrast), DEFAULT_REMOTE_CONTRAST_SETTING, |
306 | "remote contrast", NULL }, | ||
306 | {1, S_O(remote_invert), false, "remote invert", off_on }, | 307 | {1, S_O(remote_invert), false, "remote invert", off_on }, |
307 | {1, S_O(remote_flip_display), false, "remote flip display", off_on }, | 308 | {1, S_O(remote_flip_display), false, "remote flip display", off_on }, |
308 | {5, S_O(remote_backlight_timeout), 6, "remote backlight timeout", | 309 | {5, S_O(remote_backlight_timeout), 6, "remote backlight timeout", |
@@ -1365,11 +1366,18 @@ void settings_load(int which) | |||
1365 | #ifdef HAVE_RECORDING | 1366 | #ifdef HAVE_RECORDING |
1366 | global_settings.recscreen_on = false; | 1367 | global_settings.recscreen_on = false; |
1367 | #endif | 1368 | #endif |
1369 | |||
1368 | #ifdef HAVE_LCD_CONTRAST | 1370 | #ifdef HAVE_LCD_CONTRAST |
1369 | if ( global_settings.contrast < MIN_CONTRAST_SETTING ) | 1371 | if ( global_settings.contrast < MIN_CONTRAST_SETTING || |
1372 | global_settings.contrast > MAX_CONTRAST_SETTING ) | ||
1370 | global_settings.contrast = lcd_default_contrast(); | 1373 | global_settings.contrast = lcd_default_contrast(); |
1371 | #endif | 1374 | #endif |
1372 | 1375 | ||
1376 | #ifdef HAVE_LCD_REMOTE | ||
1377 | if (global_settings.remote_contrast < MIN_REMOTE_CONTRAST_SETTING || | ||
1378 | global_settings.remote_contrast > MAX_REMOTE_CONTRAST_SETTING ) | ||
1379 | global_settings.remote_contrast = lcd_remote_default_contrast(); | ||
1380 | #endif | ||
1373 | i = 0xb8; | 1381 | i = 0xb8; |
1374 | strncpy((char *)global_settings.wps_file, (char *)&config_block[i], | 1382 | strncpy((char *)global_settings.wps_file, (char *)&config_block[i], |
1375 | MAX_FILENAME); | 1383 | MAX_FILENAME); |