summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-07-09 23:07:49 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-07-09 23:07:49 +0000
commit067262dbf09d63fb645d1c2e67d225325b6854c9 (patch)
treeb971492d0c80a496e596226a952ffe222f2c468b /apps/settings.c
parent0ef911d43c364fe535111c59abab54e10dc06ce1 (diff)
downloadrockbox-067262dbf09d63fb645d1c2e67d225325b6854c9.tar.gz
rockbox-067262dbf09d63fb645d1c2e67d225325b6854c9.zip
Moved lcd default contrast knowledge from settings.c to lcd driver. Now lcd_init sets default contrast until settings are read.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3824 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 8a98010a5c..06a44a34cc 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -542,19 +542,6 @@ void settings_apply(void)
542 } 542 }
543} 543}
544 544
545static int default_contrast(void)
546{
547#ifdef SIMULATOR
548 return 30;
549#else
550#ifdef HAVE_LCD_CHARCELLS
551 return 30;
552#else
553 return (read_hw_mask() & LCD_CONTRAST_BIAS) ? 31 : 49;
554#endif
555#endif
556}
557
558/* 545/*
559 * load settings from disk or RTC RAM 546 * load settings from disk or RTC RAM
560 */ 547 */
@@ -587,7 +574,7 @@ void settings_load(void)
587 global_settings.invert = 574 global_settings.invert =
588 config_block[0xa] & 0x40 ? true : false; 575 config_block[0xa] & 0x40 ? true : false;
589 if ( global_settings.contrast < MIN_CONTRAST_SETTING ) 576 if ( global_settings.contrast < MIN_CONTRAST_SETTING )
590 global_settings.contrast = default_contrast(); 577 global_settings.contrast = lcd_default_contrast();
591 global_settings.show_icons = 578 global_settings.show_icons =
592 config_block[0xa] & 0x80 ? true : false; 579 config_block[0xa] & 0x80 ? true : false;
593 } 580 }
@@ -1414,7 +1401,7 @@ void settings_reset(void) {
1414 global_settings.rec_right_gain = 2; /* 0dB */ 1401 global_settings.rec_right_gain = 2; /* 0dB */
1415 global_settings.rec_editable = false; 1402 global_settings.rec_editable = false;
1416 global_settings.resume = RESUME_ASK; 1403 global_settings.resume = RESUME_ASK;
1417 global_settings.contrast = default_contrast(); 1404 global_settings.contrast = lcd_default_contrast();
1418 global_settings.invert = DEFAULT_INVERT_SETTING; 1405 global_settings.invert = DEFAULT_INVERT_SETTING;
1419 global_settings.poweroff = DEFAULT_POWEROFF_SETTING; 1406 global_settings.poweroff = DEFAULT_POWEROFF_SETTING;
1420 global_settings.backlight_timeout = DEFAULT_BACKLIGHT_TIMEOUT_SETTING; 1407 global_settings.backlight_timeout = DEFAULT_BACKLIGHT_TIMEOUT_SETTING;