diff options
| -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 fd6be0b..1045ba6 100644 --- a/firmware/drivers/lcd-2bit-horz.c +++ b/firmware/drivers/lcd-2bit-horz.c @@ -84,7 +84,7 @@ void lcd_init(void) int lcd_default_contrast(void) { - return 96; + return 40; } /*** parameter handling ***/ diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c index d37981a..d1d63b9 100644 --- a/firmware/drivers/lcd-ipod.c +++ b/firmware/drivers/lcd-ipod.c @@ -158,9 +158,13 @@ void lcd_update(void) lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT); } +/* Rockbox stores the contrast as 0..63 - we add 64 to it */ void lcd_set_contrast(int val) { - lcd_cmd_and_data(0x4, 0x4, val); + if (val < 0) val = 0; + else if (val > 63) val = 63; + + lcd_cmd_and_data(0x4, 0x4, val + 64); lcd_contrast = val; } |