From 067262dbf09d63fb645d1c2e67d225325b6854c9 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Wed, 9 Jul 2003 23:07:49 +0000 Subject: 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 --- apps/settings.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'apps/settings.c') 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) } } -static int default_contrast(void) -{ -#ifdef SIMULATOR - return 30; -#else -#ifdef HAVE_LCD_CHARCELLS - return 30; -#else - return (read_hw_mask() & LCD_CONTRAST_BIAS) ? 31 : 49; -#endif -#endif -} - /* * load settings from disk or RTC RAM */ @@ -587,7 +574,7 @@ void settings_load(void) global_settings.invert = config_block[0xa] & 0x40 ? true : false; if ( global_settings.contrast < MIN_CONTRAST_SETTING ) - global_settings.contrast = default_contrast(); + global_settings.contrast = lcd_default_contrast(); global_settings.show_icons = config_block[0xa] & 0x80 ? true : false; } @@ -1414,7 +1401,7 @@ void settings_reset(void) { global_settings.rec_right_gain = 2; /* 0dB */ global_settings.rec_editable = false; global_settings.resume = RESUME_ASK; - global_settings.contrast = default_contrast(); + global_settings.contrast = lcd_default_contrast(); global_settings.invert = DEFAULT_INVERT_SETTING; global_settings.poweroff = DEFAULT_POWEROFF_SETTING; global_settings.backlight_timeout = DEFAULT_BACKLIGHT_TIMEOUT_SETTING; -- cgit v1.2.3