1
0
Fork 0
forked from len0rd/rockbox

revert r24478 and make the backdrop behaviour the same as it used to be (so when in the wps the sbs' backdrop will be fully disabled). Also changes the API back to having to manually set the current backdrop.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24565 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2010-02-08 09:38:03 +00:00
parent 499a0e6bed
commit 7e6f124d4e
6 changed files with 8 additions and 28 deletions

View file

@ -1006,11 +1006,6 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
#endif #endif
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)
display->backdrop_show(data->backdrop);
#endif
/* reset to first subline if refresh all flag is set */ /* reset to first subline if refresh all flag is set */
if (refresh_mode == WPS_REFRESH_ALL) if (refresh_mode == WPS_REFRESH_ALL)
{ {

View file

@ -111,9 +111,6 @@ static void toggle_theme(enum screen_type screen, bool force)
{ {
/* remove the left overs from the previous screen. /* remove the left overs from the previous screen.
* could cause a tiny flicker. Redo your screen code if that happens */ * could cause a tiny flicker. Redo your screen code if that happens */
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)
screens[screen].backdrop_show(sb_get_backdrop(screen));
#endif
if (!was_enabled[screen] || force) if (!was_enabled[screen] || force)
{ {
struct viewport deadspace, user; struct viewport deadspace, user;

View file

@ -565,6 +565,7 @@ static void gwps_leave_wps(void)
FOR_NB_SCREENS(i) FOR_NB_SCREENS(i)
{ {
gui_wps[i].display->stop_scroll(); gui_wps[i].display->stop_scroll();
gui_wps[i].display->backdrop_show(sb_get_backdrop(i));
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
bool draw = false; bool draw = false;
@ -601,9 +602,10 @@ static void gwps_enter_wps(void)
else if (statusbar_position(i) != STATUSBAR_OFF) else if (statusbar_position(i) != STATUSBAR_OFF)
draw = true; draw = true;
#endif #endif
display->stop_scroll();
display->backdrop_show(gwps->data->backdrop);
viewportmanager_theme_enable(i, draw, NULL); viewportmanager_theme_enable(i, draw, NULL);
display->stop_scroll();
/* Update the values in the first (default) viewport - in case the user /* Update the values in the first (default) viewport - in case the user
has modified the statusbar or colour settings */ has modified the statusbar or colour settings */
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1

View file

@ -737,6 +737,7 @@ void sound_settings_apply(void)
void settings_apply_skins(void) void settings_apply_skins(void)
{ {
char buf[MAX_PATH]; char buf[MAX_PATH];
int i;
/* re-initialize the skin buffer before we start reloading skins */ /* re-initialize the skin buffer before we start reloading skins */
skin_buffer_init(); skin_buffer_init();
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
@ -786,6 +787,8 @@ void settings_apply_skins(void)
} }
#endif #endif
viewportmanager_theme_changed(THEME_STATUSBAR); viewportmanager_theme_changed(THEME_STATUSBAR);
FOR_NB_SCREENS(i)
screens[i].backdrop_show(sb_get_backdrop(i));
} }
void settings_apply(bool read_disk) void settings_apply(bool read_disk)

View file

@ -39,9 +39,6 @@
#define MAIN_LCD #define MAIN_LCD
#endif #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) #if defined(MAIN_LCD) && defined(HAVE_LCD_COLOR)
/* Fill a rectangle with a gradient */ /* Fill a rectangle with a gradient */
static void lcd_gradient_rect(int x1, int x2, int y, unsigned h, static void lcd_gradient_rect(int x1, int x2, int y, unsigned h,
@ -373,10 +370,7 @@ void LCDFN(puts_scroll_style_offset)(int x, int y, const unsigned char *string,
s->len = utf8length(string); s->len = utf8length(string);
s->offset = offset; s->offset = offset;
s->startx = x * LCDFN(getstringsize)(" ", NULL, NULL); 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++; LCDFN(scroll_info).lines++;
} }
@ -405,9 +399,6 @@ void LCDFN(scroll_fn)(void)
int index; int index;
int xpos, ypos; int xpos, ypos;
struct viewport* old_vp = current_vp; 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++ ) { for ( index = 0; index < LCDFN(scroll_info).lines; index++ ) {
s = &LCDFN(scroll_info).scroll[index]; s = &LCDFN(scroll_info).scroll[index];
@ -417,9 +408,7 @@ void LCDFN(scroll_fn)(void)
continue; continue;
LCDFN(set_viewport)(s->vp); LCDFN(set_viewport)(s->vp);
#if HAS_BACKDROP
LCDFN(set_backdrop)((FBFN(data*))s->backdrop);
#endif
if (s->backward) if (s->backward)
s->offset -= LCDFN(scroll_info).step; s->offset -= LCDFN(scroll_info).step;
else else
@ -453,8 +442,5 @@ void LCDFN(scroll_fn)(void)
LCDFN(update_viewport_rect)(xpos, ypos, current_vp->width - xpos, LCDFN(update_viewport_rect)(xpos, ypos, current_vp->width - xpos,
pf->height); pf->height);
} }
#if HAS_BACKDROP
LCDFN(set_backdrop)(old_backdrop);
#endif
LCDFN(set_viewport)(old_vp); LCDFN(set_viewport)(old_vp);
} }

View file

@ -55,9 +55,6 @@ struct scrollinfo
int offset; int offset;
int startx; int startx;
#ifdef HAVE_LCD_BITMAP #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 width; /* length of line in pixels */
int style; /* line style */ int style; /* line style */
#endif/* HAVE_LCD_BITMAP */ #endif/* HAVE_LCD_BITMAP */