mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Store listitem_viewport_cfg->label as skinoffset instead of raw pointer
This fixes the case where some blocks got relocated and the skin render code couldn't find the matching viewports any more. Change-Id: I4394444fb139ee5bc986f374dba82a104013e354 Reviewed-on: http://gerrit.rockbox.org/112 Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
This commit is contained in:
parent
a16b65e47d
commit
680c6fcde1
3 changed files with 3 additions and 3 deletions
|
@ -165,7 +165,7 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list)
|
||||||
wps.display = display;
|
wps.display = display;
|
||||||
wps.data = listcfg[screen]->data;
|
wps.data = listcfg[screen]->data;
|
||||||
display_lines = skinlist_get_line_count(screen, list);
|
display_lines = skinlist_get_line_count(screen, list);
|
||||||
label = listcfg[screen]->label;
|
label = (char *)SKINOFFSETTOPTR(get_skin_buffer(wps.data), listcfg[screen]->label);
|
||||||
display->set_viewport(parent);
|
display->set_viewport(parent);
|
||||||
display->clear_viewport();
|
display->clear_viewport();
|
||||||
current_item = list->selected_item;
|
current_item = list->selected_item;
|
||||||
|
|
|
@ -180,7 +180,7 @@ extern bool gui_synclist_do_button(struct gui_synclist * lists,
|
||||||
#if defined(HAVE_LCD_BITMAP) && !defined(PLUGIN)
|
#if defined(HAVE_LCD_BITMAP) && !defined(PLUGIN)
|
||||||
struct listitem_viewport_cfg {
|
struct listitem_viewport_cfg {
|
||||||
struct wps_data *data;
|
struct wps_data *data;
|
||||||
char* label;
|
OFFSETTYPE(char *) label;
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
int xmargin;
|
int xmargin;
|
||||||
|
|
|
@ -577,7 +577,7 @@ static int parse_listitemviewport(struct skin_element *element,
|
||||||
return -1;
|
return -1;
|
||||||
cfg->data = wps_data;
|
cfg->data = wps_data;
|
||||||
cfg->tile = false;
|
cfg->tile = false;
|
||||||
cfg->label = get_param_text(element, 0);
|
cfg->label = PTRTOSKINOFFSET(skin_buffer, get_param_text(element, 0));
|
||||||
cfg->width = -1;
|
cfg->width = -1;
|
||||||
cfg->height = -1;
|
cfg->height = -1;
|
||||||
if (!isdefault(get_param(element, 1)))
|
if (!isdefault(get_param(element, 1)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue