diff options
author | Thom Johansen <thomj@rockbox.org> | 2005-11-09 17:54:31 +0000 |
---|---|---|
committer | Thom Johansen <thomj@rockbox.org> | 2005-11-09 17:54:31 +0000 |
commit | 8c75c4a7632a1072890f40f196b6dcecb8d7a3b0 (patch) | |
tree | 7618f369c365fc0dedc4df1a79610bddefa8bf9c /firmware/drivers | |
parent | 005a09daaaf1e9caa87857fd2103c5640f4b7bf9 (diff) |
A couple of fixes for Nanos.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7803 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/lcd-16bit.c | 10 |
1 files changed, 9 insertions, 1 deletions
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 */ |