Skip to content

Commit 9e2cd39

Browse files
committed
Fix FS#11508 - remote LCD targets crash because the remote wps fails to load
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27653 a1c6a512-1295-4272-9138-f99709370657
1 parent befffc8 commit 9e2cd39

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

apps/gui/skin_engine/skin_parser.c

+17
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ static int parse_statusbar_tags(struct skin_element* element,
194194
{
195195
viewport_set_fullscreen(&default_vp->vp, curr_screen);
196196
}
197+
#ifdef HAVE_REMOTE_LCD
198+
/* viewport_set_defaults() sets the font to FONT_UI+curr_screen.
199+
* This parser requires font 1 to always be the UI font,
200+
* so force it back to FONT_UI and handle the screen number at the end */
201+
default_vp->vp.font = FONT_UI;
202+
#endif
197203
}
198204
return 0;
199205
}
@@ -991,6 +997,11 @@ static bool load_skin_bitmaps(struct wps_data *wps_data, char *bmpdir)
991997
*/
992998
if (wps_data->backdrop)
993999
{
1000+
if (screens[curr_screen].depth == 1)
1001+
{
1002+
wps_data->backdrop = NULL;
1003+
return retval;
1004+
}
9941005
bool needed = wps_data->backdrop[0] != '-';
9951006
wps_data->backdrop = skin_backdrop_load(wps_data->backdrop,
9961007
bmpdir, curr_screen);
@@ -1081,6 +1092,12 @@ static int convert_viewport(struct wps_data *data, struct skin_element* element)
10811092
curr_viewport_element = element;
10821093

10831094
viewport_set_defaults(&skin_vp->vp, curr_screen);
1095+
#ifdef HAVE_REMOTE_LCD
1096+
/* viewport_set_defaults() sets the font to FONT_UI+curr_screen.
1097+
* This parser requires font 1 to always be the UI font,
1098+
* so force it back to FONT_UI and handle the screen number at the end */
1099+
skin_vp->vp.font = FONT_UI;
1100+
#endif
10841101

10851102
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
10861103
skin_vp->start_fgcolour = skin_vp->vp.fg_pattern;

0 commit comments

Comments
 (0)