forked from len0rd/rockbox
XLCD lib: * Fix bug (improper fill) in pixel-wise left scrolling on 2bpp horizontally packed LCDs. * Faster pixel-wise upward scrolling on 2bpp vertically packed LCD coldfire targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23704 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
48df607faa
commit
728f698fa1
1 changed files with 3 additions and 6 deletions
|
@ -171,7 +171,7 @@ void xlcd_scroll_left(int count)
|
||||||
int bx, y;
|
int bx, y;
|
||||||
unsigned char *addr = rb->lcd_framebuffer + blocklen;
|
unsigned char *addr = rb->lcd_framebuffer + blocklen;
|
||||||
#if LCD_DEPTH == 2
|
#if LCD_DEPTH == 2
|
||||||
unsigned fill = 0x55 * (~rb->lcd_get_background() & 3);
|
unsigned fill = (0x55 * (~rb->lcd_get_background() & 3)) << bitcount;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (y = 0; y < LCD_HEIGHT; y++)
|
for (y = 0; y < LCD_HEIGHT; y++)
|
||||||
|
@ -479,12 +479,9 @@ void xlcd_scroll_up(int count)
|
||||||
".su_iloop: \n" /* repeat for all rows */
|
".su_iloop: \n" /* repeat for all rows */
|
||||||
"sub.l %[wide],%%a1\n" /* address -= width */
|
"sub.l %[wide],%%a1\n" /* address -= width */
|
||||||
|
|
||||||
"clr.l %%d0 \n"
|
|
||||||
"move.b (%%a1),%%d0 \n" /* get data byte */
|
|
||||||
"lsl.l #8,%%d1 \n" /* old data to 2nd byte */
|
"lsl.l #8,%%d1 \n" /* old data to 2nd byte */
|
||||||
"or.l %%d1,%%d0 \n" /* combine old data */
|
"move.b (%%a1),%%d1 \n" /* combine with new data byte */
|
||||||
"clr.l %%d1 \n"
|
"move.l %%d1,%%d0 \n" /* keep data for next round */
|
||||||
"move.b %%d0,%%d1 \n" /* keep data for next round */
|
|
||||||
"lsr.l %[cnt],%%d0 \n" /* shift right */
|
"lsr.l %[cnt],%%d0 \n" /* shift right */
|
||||||
"move.b %%d0,(%%a1) \n" /* store data */
|
"move.b %%d0,(%%a1) \n" /* store data */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue