summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-02-03 07:03:48 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-02-03 07:03:48 +0000
commit0a16a99a696545fec80643cee6aae5d1b65869d7 (patch)
treee1d4de3259ebb61507ae99d02ccdd3d3d9906c7b
parenteb30ca2a1e78aa2304365af3890f435e5dd57ad8 (diff)
downloadrockbox-0a16a99a696545fec80643cee6aae5d1b65869d7.zip
rockbox-0a16a99a696545fec80643cee6aae5d1b65869d7.tar.gz
rockbox-0a16a99a696545fec80643cee6aae5d1b65869d7.tar.bz2
rockbox-0a16a99a696545fec80643cee6aae5d1b65869d7.tar.xz
fix a bug where the backdrop from the sbs is displayed on scrolling lines in the wps when the %wd tag is not used.
I'm not crazy about this commit and maybe a better solution would be to outright disable the sbs backdrop when in any skinned screen. This then means backdrops go back to needing special handling (i.e they arnt "free") git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24478 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/skin_engine/skin_display.c2
-rw-r--r--firmware/drivers/lcd-bitmap-common.c18
-rw-r--r--firmware/export/scroll_engine.h3
3 files changed, 20 insertions, 3 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index c1aebad..9ec4a9e 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -1007,7 +1007,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
#endif
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)
- display->backdrop_show(data->backdrop);
+ display->backdrop_show(data->backdrop);
#endif
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index 586c745..24c5aa1 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -39,6 +39,9 @@
#define MAIN_LCD
#endif
+#define HAS_BACKDROP ((defined(MAIN_LCD) && LCD_DEPTH > 1) \
+ || (!defined(MAIN_LCD) && LCD_REMOTE_DEPTH > 1))
+
#if defined(MAIN_LCD) && defined(HAVE_LCD_COLOR)
/* Fill a rectangle with a gradient */
static void lcd_gradient_rect(int x1, int x2, int y, unsigned h,
@@ -370,7 +373,10 @@ void LCDFN(puts_scroll_style_offset)(int x, int y, const unsigned char *string,
s->len = utf8length(string);
s->offset = offset;
s->startx = x * LCDFN(getstringsize)(" ", NULL, NULL);
- s->backward = false;
+ s->backward = false;
+#if HAS_BACKDROP
+ s->backdrop = (char*)LCDFN(get_backdrop());
+#endif
LCDFN(scroll_info).lines++;
}
@@ -399,6 +405,9 @@ void LCDFN(scroll_fn)(void)
int index;
int xpos, ypos;
struct viewport* old_vp = current_vp;
+#if HAS_BACKDROP
+ FBFN(data*) old_backdrop = LCDFN(get_backdrop)();
+#endif
for ( index = 0; index < LCDFN(scroll_info).lines; index++ ) {
s = &LCDFN(scroll_info).scroll[index];
@@ -408,7 +417,9 @@ void LCDFN(scroll_fn)(void)
continue;
LCDFN(set_viewport)(s->vp);
-
+#if HAS_BACKDROP
+ LCDFN(set_backdrop)((FBFN(data*))s->backdrop);
+#endif
if (s->backward)
s->offset -= LCDFN(scroll_info).step;
else
@@ -442,5 +453,8 @@ void LCDFN(scroll_fn)(void)
LCDFN(update_viewport_rect)(xpos, ypos, current_vp->width - xpos,
pf->height);
}
+#if HAS_BACKDROP
+ LCDFN(set_backdrop)(old_backdrop);
+#endif
LCDFN(set_viewport)(old_vp);
}
diff --git a/firmware/export/scroll_engine.h b/firmware/export/scroll_engine.h
index 0fcb06a..838926a 100644
--- a/firmware/export/scroll_engine.h
+++ b/firmware/export/scroll_engine.h
@@ -55,6 +55,9 @@ struct scrollinfo
int offset;
int startx;
#ifdef HAVE_LCD_BITMAP
+#if LCD_DEPTH > 1 || (defined(HAVE_LCD_REMOTE) && LCD_REMOTE_DEPTH > 1)
+ char *backdrop;
+#endif
int width; /* length of line in pixels */
int style; /* line style */
#endif/* HAVE_LCD_BITMAP */