Fix a bug in lib display_text.h, which inserts a unwanted blank line

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21881 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Johannes Schwarz 2009-07-15 15:14:17 +00:00
parent fb63808c55
commit b018f89049

View File

@ -62,16 +62,15 @@ bool display_text(short words, char** text, struct style_text* style,
rb->lcd_getstringsize(" ", &space_w, &height);
for (i = 0; i < words; i++) {
rb->lcd_getstringsize(text[i], &width, NULL);
/* skip to next line if the current one can't fit the word */
if (x + width > vp_width - MARGIN) {
x = MARGIN;
y = y + height;
}
/* .. or if the word is the empty string */
/* skip to next line if the word is an empty string */
if (rb->strcmp(text[i], "")==0) {
x = MARGIN;
y = y + height;
continue;
/* .. or if the current one can't fit the word */
} else if (x + width > vp_width - MARGIN) {
x = MARGIN;
y = y + height;
}
/* display the remaining text by button click or exit */
if (y + height > vp_height - MARGIN) {