Make %LC and %LR always have predictable and usable values.

%LC is now 1 for non-tiled list items (instead of undefined)
%LC and %LR are now -1 in non-list contexts.

Change-Id: Ib7090429fa95528bd141d3d7ca95fd917b25b96e
This commit is contained in:
Frank Gevaerts 2012-03-01 18:38:57 +01:00
parent dc572fbde3
commit 4fbbbf1360

View file

@ -57,6 +57,8 @@ void skinlist_set_cfg(enum screen_type screen,
screens[screen].scroll_stop(&listcfg[screen]->selected_item_vp.vp);
listcfg[screen] = cfg;
current_list = NULL;
current_column = -1;
current_row = -1;
}
}
@ -225,6 +227,7 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list)
}
else
{
current_column = 1;
current_row = cur_line;
skin_viewport->vp.x = parent->x + original_x;
skin_viewport->vp.y = parent->y + original_y +
@ -257,6 +260,8 @@ bool skinlist_draw(struct screen *display, struct gui_synclist *list)
}
}
}
current_column = -1;
current_row = -1;
display->set_viewport(parent);
display->update_viewport();
current_drawing_line = list->selected_item;