From 8c75c4a7632a1072890f40f196b6dcecb8d7a3b0 Mon Sep 17 00:00:00 2001 From: Thom Johansen Date: Wed, 9 Nov 2005 17:54:31 +0000 Subject: A couple of fixes for Nanos. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7803 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-16bit.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'firmware/drivers') diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index d6ce5dc389..836baa854c 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c @@ -286,11 +286,17 @@ void lcd_update_rect(int x, int y, int width, int height) unsigned short *addr = (unsigned short *)lcd_framebuffer; /* calculate the drawing region */ + #if CONFIG_LCD == IPOD_COLOR rect1 = x; /* start vert */ rect2 = (LCD_WIDTH - 1) - y; /* start horiz */ rect3 = (x + height) - 1; /* end vert */ rect4 = (rect2 - width) + 1; /* end horiz */ - + #else + rect1 = y; /* start horiz */ + rect2 = x; /* start vert */ + rect3 = (y + width) - 1; /* max horiz */ + rect4 = (x + height) - 1; /* max vert */ + #endif /* setup the drawing region */ if (lcd_type == 0) { lcd_cmd_data(0x12, rect1); /* start vert */ @@ -320,7 +326,9 @@ void lcd_update_rect(int x, int y, int width, int height) lcd_cmd_data(0x45, (rect4 << 8) | rect2); /* start vert = max vert */ + #if CONFIG_LCD == IPOD_COLOR rect2 = rect4; + #endif /* position cursor (set AD0-AD15) */ /* start vert << 8 | start horiz */ -- cgit v1.2.3