mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
make the plugin API frambuffer agnostic
Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
This commit is contained in:
parent
5d5f8169b5
commit
12f3ed1699
25 changed files with 92 additions and 93 deletions
|
@ -43,7 +43,7 @@ void xlcd_scroll_left(int count)
|
|||
|
||||
length = (LCD_WIDTH-count)*LCD_FBHEIGHT;
|
||||
|
||||
rb->memmove(rb->lcd_framebuffer, rb->lcd_framebuffer + LCD_HEIGHT*count,
|
||||
rb->memmove(*rb->lcd_framebuffer, *rb->lcd_framebuffer + LCD_HEIGHT*count,
|
||||
length * sizeof(fb_data));
|
||||
|
||||
oldmode = rb->lcd_get_drawmode();
|
||||
|
@ -65,8 +65,8 @@ void xlcd_scroll_right(int count)
|
|||
|
||||
length = (LCD_WIDTH-count)*LCD_FBHEIGHT;
|
||||
|
||||
rb->memmove(rb->lcd_framebuffer + LCD_HEIGHT*count,
|
||||
rb->lcd_framebuffer, length * sizeof(fb_data));
|
||||
rb->memmove(*rb->lcd_framebuffer + LCD_HEIGHT*count,
|
||||
*rb->lcd_framebuffer, length * sizeof(fb_data));
|
||||
|
||||
oldmode = rb->lcd_get_drawmode();
|
||||
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
|
||||
|
@ -90,7 +90,7 @@ void xlcd_scroll_up(int count)
|
|||
length = LCD_HEIGHT - count;
|
||||
|
||||
width = LCD_WIDTH-1;
|
||||
data = rb->lcd_framebuffer;
|
||||
data = *rb->lcd_framebuffer;
|
||||
|
||||
do {
|
||||
rb->memmove(data,data + count,length * sizeof(fb_data));
|
||||
|
@ -119,7 +119,7 @@ void xlcd_scroll_down(int count)
|
|||
length = LCD_HEIGHT - count;
|
||||
|
||||
width = LCD_WIDTH-1;
|
||||
data = rb->lcd_framebuffer;
|
||||
data = *rb->lcd_framebuffer;
|
||||
|
||||
do {
|
||||
rb->memmove(data + count, data, length * sizeof(fb_data));
|
||||
|
@ -155,7 +155,7 @@ void xlcd_scroll_left(int count)
|
|||
|
||||
if (blockcount)
|
||||
{
|
||||
unsigned char *data = rb->lcd_framebuffer;
|
||||
unsigned char *data = *rb->lcd_framebuffer;
|
||||
unsigned char *data_end = data + LCD_FBWIDTH*LCD_HEIGHT;
|
||||
|
||||
do
|
||||
|
@ -168,7 +168,7 @@ void xlcd_scroll_left(int count)
|
|||
if (bitcount)
|
||||
{
|
||||
int bx, y;
|
||||
unsigned char *addr = rb->lcd_framebuffer + blocklen;
|
||||
unsigned char *addr = *rb->lcd_framebuffer + blocklen;
|
||||
#if LCD_DEPTH == 2
|
||||
unsigned fill = (0x55 * (~rb->lcd_get_background() & 3)) << bitcount;
|
||||
#endif
|
||||
|
@ -213,7 +213,7 @@ void xlcd_scroll_right(int count)
|
|||
|
||||
if (blockcount)
|
||||
{
|
||||
unsigned char *data = rb->lcd_framebuffer;
|
||||
unsigned char *data = *rb->lcd_framebuffer;
|
||||
unsigned char *data_end = data + LCD_FBWIDTH*LCD_HEIGHT;
|
||||
|
||||
do
|
||||
|
@ -226,7 +226,7 @@ void xlcd_scroll_right(int count)
|
|||
if (bitcount)
|
||||
{
|
||||
int bx, y;
|
||||
unsigned char *addr = rb->lcd_framebuffer + blockcount;
|
||||
unsigned char *addr = *rb->lcd_framebuffer + blockcount;
|
||||
#if LCD_DEPTH == 2
|
||||
unsigned fill = 0x55 * (~rb->lcd_get_background() & 3);
|
||||
#endif
|
||||
|
@ -265,7 +265,7 @@ void xlcd_scroll_left(int count)
|
|||
return;
|
||||
}
|
||||
|
||||
data = rb->lcd_framebuffer;
|
||||
data = *rb->lcd_framebuffer;
|
||||
data_end = data + LCD_WIDTH*LCD_FBHEIGHT;
|
||||
length = LCD_WIDTH - count;
|
||||
|
||||
|
@ -294,7 +294,7 @@ void xlcd_scroll_right(int count)
|
|||
return;
|
||||
}
|
||||
|
||||
data = rb->lcd_framebuffer;
|
||||
data = *rb->lcd_framebuffer;
|
||||
data_end = data + LCD_WIDTH*LCD_FBHEIGHT;
|
||||
length = LCD_WIDTH - count;
|
||||
|
||||
|
@ -328,8 +328,8 @@ void xlcd_scroll_up(int count)
|
|||
|
||||
length = LCD_HEIGHT - count;
|
||||
|
||||
rb->memmove(rb->lcd_framebuffer,
|
||||
rb->lcd_framebuffer + count * LCD_FBWIDTH,
|
||||
rb->memmove(*rb->lcd_framebuffer,
|
||||
*rb->lcd_framebuffer + count * LCD_FBWIDTH,
|
||||
length * LCD_FBWIDTH * sizeof(fb_data));
|
||||
|
||||
oldmode = rb->lcd_get_drawmode();
|
||||
|
@ -351,8 +351,8 @@ void xlcd_scroll_down(int count)
|
|||
|
||||
length = LCD_HEIGHT - count;
|
||||
|
||||
rb->memmove(rb->lcd_framebuffer + count * LCD_FBWIDTH,
|
||||
rb->lcd_framebuffer,
|
||||
rb->memmove(*rb->lcd_framebuffer + count * LCD_FBWIDTH,
|
||||
*rb->lcd_framebuffer,
|
||||
length * LCD_FBWIDTH * sizeof(fb_data));
|
||||
|
||||
oldmode = rb->lcd_get_drawmode();
|
||||
|
@ -388,8 +388,8 @@ void xlcd_scroll_up(int count)
|
|||
|
||||
if (blockcount)
|
||||
{
|
||||
rb->memmove(rb->lcd_framebuffer,
|
||||
rb->lcd_framebuffer + blockcount * LCD_FBWIDTH,
|
||||
rb->memmove(*rb->lcd_framebuffer,
|
||||
*rb->lcd_framebuffer + blockcount * LCD_FBWIDTH,
|
||||
blocklen * LCD_FBWIDTH * sizeof(fb_data));
|
||||
}
|
||||
if (bitcount)
|
||||
|
@ -424,7 +424,7 @@ void xlcd_scroll_up(int count)
|
|||
: /* inputs */
|
||||
[wide]"r"(LCD_FBWIDTH),
|
||||
[rows]"r"(blocklen),
|
||||
[addr]"a"(rb->lcd_framebuffer + blocklen * LCD_FBWIDTH),
|
||||
[addr]"a"(*rb->lcd_framebuffer + blocklen * LCD_FBWIDTH),
|
||||
[cnt] "d"(bitcount),
|
||||
[bkg] "d"(0x55 * (~rb->lcd_get_background() & 3))
|
||||
: /* clobbers */
|
||||
|
@ -432,7 +432,7 @@ void xlcd_scroll_up(int count)
|
|||
);
|
||||
#else /* C version */
|
||||
int x, by;
|
||||
unsigned char *addr = rb->lcd_framebuffer + blocklen * LCD_FBWIDTH;
|
||||
unsigned char *addr = *rb->lcd_framebuffer + blocklen * LCD_FBWIDTH;
|
||||
#if LCD_DEPTH == 2
|
||||
unsigned fill = 0x55 * (~rb->lcd_get_background() & 3);
|
||||
#else
|
||||
|
@ -457,7 +457,7 @@ void xlcd_scroll_up(int count)
|
|||
|
||||
#if LCD_DEPTH == 2
|
||||
int x, by;
|
||||
fb_data *addr = rb->lcd_framebuffer + blocklen * LCD_FBWIDTH;
|
||||
fb_data *addr = *rb->lcd_framebuffer + blocklen * LCD_FBWIDTH;
|
||||
unsigned fill, mask;
|
||||
|
||||
fill = patterns[rb->lcd_get_background() & 3] << 8;
|
||||
|
@ -512,8 +512,8 @@ void xlcd_scroll_down(int count)
|
|||
|
||||
if (blockcount)
|
||||
{
|
||||
rb->memmove(rb->lcd_framebuffer + blockcount * LCD_FBWIDTH,
|
||||
rb->lcd_framebuffer,
|
||||
rb->memmove(*rb->lcd_framebuffer + blockcount * LCD_FBWIDTH,
|
||||
*rb->lcd_framebuffer,
|
||||
blocklen * LCD_FBWIDTH * sizeof(fb_data));
|
||||
}
|
||||
if (bitcount)
|
||||
|
@ -548,7 +548,7 @@ void xlcd_scroll_down(int count)
|
|||
: /* inputs */
|
||||
[wide]"r"(LCD_WIDTH),
|
||||
[rows]"r"(blocklen),
|
||||
[addr]"a"(rb->lcd_framebuffer + blockcount * LCD_FBWIDTH),
|
||||
[addr]"a"(*rb->lcd_framebuffer + blockcount * LCD_FBWIDTH),
|
||||
[cnt] "d"(bitcount),
|
||||
[bkg] "d"((0x55 * (~rb->lcd_get_background() & 3)) << bitcount)
|
||||
: /* clobbers */
|
||||
|
@ -556,7 +556,7 @@ void xlcd_scroll_down(int count)
|
|||
);
|
||||
#else /* C version */
|
||||
int x, by;
|
||||
unsigned char *addr = rb->lcd_framebuffer + blockcount * LCD_FBWIDTH;
|
||||
unsigned char *addr = *rb->lcd_framebuffer + blockcount * LCD_FBWIDTH;
|
||||
#if LCD_DEPTH == 2
|
||||
unsigned fill = (0x55 * (~rb->lcd_get_background() & 3)) << bitcount;
|
||||
#else
|
||||
|
@ -581,7 +581,7 @@ void xlcd_scroll_down(int count)
|
|||
|
||||
#if LCD_DEPTH == 2
|
||||
int x, by;
|
||||
fb_data *addr = rb->lcd_framebuffer + blockcount * LCD_FBWIDTH;
|
||||
fb_data *addr = *rb->lcd_framebuffer + blockcount * LCD_FBWIDTH;
|
||||
unsigned fill, mask;
|
||||
|
||||
fill = patterns[rb->lcd_get_background() & 3] >> (8 - bitcount);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue