summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lib
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
parent5d5f8169b53fc989b456b0f0d7940bcf9415cbeb (diff)
downloadrockbox-12f3ed1699.tar.gz
rockbox-12f3ed1699.tar.bz2
rockbox-12f3ed1699.zip
make the plugin API frambuffer agnostic
Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/grey_core.c8
-rw-r--r--apps/plugins/lib/osd.c2
-rw-r--r--apps/plugins/lib/xlcd_draw.c4
-rw-r--r--apps/plugins/lib/xlcd_scroll.c50
4 files changed, 32 insertions, 32 deletions
diff --git a/apps/plugins/lib/grey_core.c b/apps/plugins/lib/grey_core.c
index 55d0684103..9686f1d021 100644
--- a/apps/plugins/lib/grey_core.c
+++ b/apps/plugins/lib/grey_core.c
@@ -845,7 +845,7 @@ static void grey_screendump_hook(int fd)
gsrc = _grey_info.values + _GREY_MULUQ(_grey_info.width, gy);
#if LCD_DEPTH == 2
- src = rb->lcd_framebuffer + _GREY_MULUQ(LCD_FBWIDTH, y);
+ src = *rb->lcd_framebuffer + _GREY_MULUQ(LCD_FBWIDTH, y);
do
{
@@ -876,7 +876,7 @@ static void grey_screendump_hook(int fd)
#if LCD_DEPTH == 1
mask = BIT_N(y & 7);
- src = rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3);
+ src = *rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3);
do
{
@@ -908,7 +908,7 @@ static void grey_screendump_hook(int fd)
#elif LCD_DEPTH == 2
shift = 2 * (y & 3);
- src = rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 2);
+ src = *rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 2);
do
{
@@ -933,7 +933,7 @@ static void grey_screendump_hook(int fd)
#if LCD_DEPTH == 2
shift = y & 7;
- src = rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3);
+ src = *rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3);
do
{
diff --git a/apps/plugins/lib/osd.c b/apps/plugins/lib/osd.c
index d2e0fe3e50..97db09cc1e 100644
--- a/apps/plugins/lib/osd.c
+++ b/apps/plugins/lib/osd.c
@@ -227,7 +227,7 @@ static void * _osd_lcd_init_buffers(struct osd *osd, unsigned flags,
osd->back_bitmap_stride = w;
#endif /* end stride type selection */
- osd->lcd_bitmap_data = (void *)rb->lcd_framebuffer;
+ osd->lcd_bitmap_data = (void *)*rb->lcd_framebuffer;
osd->back_bitmap_data = buf;
osd->maxwidth = w;
diff --git a/apps/plugins/lib/xlcd_draw.c b/apps/plugins/lib/xlcd_draw.c
index 25ef7518a1..b6ed403353 100644
--- a/apps/plugins/lib/xlcd_draw.c
+++ b/apps/plugins/lib/xlcd_draw.c
@@ -377,7 +377,7 @@ void xlcd_gray_bitmap_part(const unsigned char *src, int src_x, int src_y,
src += stride * src_y + src_x; /* move starting point */
src_end = src + stride * height;
- dst = rb->lcd_framebuffer + LCD_WIDTH * y + x;
+ dst = *rb->lcd_framebuffer + LCD_WIDTH * y + x;
do
{
@@ -444,7 +444,7 @@ void xlcd_color_bitmap_part(const unsigned char *src, int src_x, int src_y,
src += 3 * (stride * src_y + src_x); /* move starting point */
src_end = src + 3 * stride * height;
- dst = rb->lcd_framebuffer + LCD_WIDTH * y + x;
+ dst = *rb->lcd_framebuffer + LCD_WIDTH * y + x;
do
{
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);