diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/lcd-2bit-horz.c | 2 | ||||
-rw-r--r-- | firmware/drivers/lcd-ipod.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c index fd6be0be05..1045ba654b 100644 --- a/firmware/drivers/lcd-2bit-horz.c +++ b/firmware/drivers/lcd-2bit-horz.c | |||
@@ -84,7 +84,7 @@ void lcd_init(void) | |||
84 | 84 | ||
85 | int lcd_default_contrast(void) | 85 | int lcd_default_contrast(void) |
86 | { | 86 | { |
87 | return 96; | 87 | return 40; |
88 | } | 88 | } |
89 | 89 | ||
90 | /*** parameter handling ***/ | 90 | /*** parameter handling ***/ |
diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c index d37981a964..d1d63b9911 100644 --- a/firmware/drivers/lcd-ipod.c +++ b/firmware/drivers/lcd-ipod.c | |||
@@ -158,9 +158,13 @@ void lcd_update(void) | |||
158 | lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT); | 158 | lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT); |
159 | } | 159 | } |
160 | 160 | ||
161 | /* Rockbox stores the contrast as 0..63 - we add 64 to it */ | ||
161 | void lcd_set_contrast(int val) | 162 | void lcd_set_contrast(int val) |
162 | { | 163 | { |
163 | lcd_cmd_and_data(0x4, 0x4, val); | 164 | if (val < 0) val = 0; |
165 | else if (val > 63) val = 63; | ||
166 | |||
167 | lcd_cmd_and_data(0x4, 0x4, val + 64); | ||
164 | lcd_contrast = val; | 168 | lcd_contrast = val; |
165 | } | 169 | } |
166 | 170 | ||