summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-08-31 02:19:48 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-08-31 02:19:48 +0000
commit4dd6b144531711776abc0e9a4ad55bf8e281369f (patch)
tree8e86a6f9e3573fb7d679fbad8f59ba523239b142
parent1477aca562038acfc1a9d382651519c593ea1ec4 (diff)
downloadrockbox-4dd6b144531711776abc0e9a4ad55bf8e281369f.tar.gz
rockbox-4dd6b144531711776abc0e9a4ad55bf8e281369f.zip
Should fix the line alternator issue described in http://forums.rockbox.org/index.php?topic=25545
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27956 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/skin_engine/skin_render.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c
index 0c18848645..46ae16b1ab 100644
--- a/apps/gui/skin_engine/skin_render.c
+++ b/apps/gui/skin_engine/skin_render.c
@@ -509,10 +509,16 @@ bool skin_render_alternator(struct skin_element* element, struct skin_draw_info
}
if (element->children[alternator->current_line]->children_count == 0)
{
+ int old_line = alternator->current_line;
+ int line = alternator->current_line+1;
/* skip empty sublines */
- alternator->current_line++;
- if (alternator->current_line >= element->children_count)
- alternator->current_line = 0;
+ while (line!=old_line && element->children[line]->children_count == 0)
+ {
+ line++;
+ if (line >= element->children_count)
+ line = 0;
+ }
+ alternator->current_line = line;
changed_lines = true;
}