A couple of fixes for Nanos.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7803 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
005a09daaa
commit
8c75c4a763
1 changed files with 9 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue