summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lib/xlcd_scroll.c
diff options
context:
space:
mode:
authorMoshe Piekarski <dev.rockbox@melachim.net>2020-10-06 13:34:04 -0500
committerWilliam Wilgus <wilgus.william@gmail.com>2020-10-26 12:28:48 -0400
commit12f3ed1699d6bef25bed90ba95cbcc1a6bb4934a (patch)
treecb9850c2c4ea68b7acc816828c4d53dd7c8391f9 /apps/plugins/lib/xlcd_scroll.c
parent5d5f8169b53fc989b456b0f0d7940bcf9415cbeb (diff)
downloadrockbox-12f3ed1699d6bef25bed90ba95cbcc1a6bb4934a.tar.gz
rockbox-12f3ed1699d6bef25bed90ba95cbcc1a6bb4934a.tar.bz2
rockbox-12f3ed1699d6bef25bed90ba95cbcc1a6bb4934a.zip
make the plugin API frambuffer agnostic
Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
Diffstat (limited to 'apps/plugins/lib/xlcd_scroll.c')
-rw-r--r--apps/plugins/lib/xlcd_scroll.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/apps/plugins/lib/xlcd_scroll.c b/apps/plugins/lib/xlcd_scroll.c
index e0fead71be..ab9ee1c4cb 100644
--- a/apps/plugins/lib/xlcd_scroll.c
+++ b/apps/plugins/lib/xlcd_scroll.c
@@ -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);