summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJohannes Schwarz <ubuntuxer@rockbox.org>2009-07-15 15:14:17 +0000
committerJohannes Schwarz <ubuntuxer@rockbox.org>2009-07-15 15:14:17 +0000
commitb018f890495ecc2b5fb4d04e5133ab2ae854f494 (patch)
tree7e1851c47844c60687e787651682054fa4c9c4be /apps
parentfb63808c55e9f666a657a19d6d0490969fcf813c (diff)
downloadrockbox-b018f890495ecc2b5fb4d04e5133ab2ae854f494.tar.gz
rockbox-b018f890495ecc2b5fb4d04e5133ab2ae854f494.zip
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
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/lib/display_text.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/plugins/lib/display_text.c b/apps/plugins/lib/display_text.c
index c6b5710644..c69661030e 100644
--- a/apps/plugins/lib/display_text.c
+++ b/apps/plugins/lib/display_text.c
@@ -62,16 +62,15 @@ bool display_text(short words, char** text, struct style_text* style,
62 rb->lcd_getstringsize(" ", &space_w, &height); 62 rb->lcd_getstringsize(" ", &space_w, &height);
63 for (i = 0; i < words; i++) { 63 for (i = 0; i < words; i++) {
64 rb->lcd_getstringsize(text[i], &width, NULL); 64 rb->lcd_getstringsize(text[i], &width, NULL);
65 /* skip to next line if the current one can't fit the word */ 65 /* skip to next line if the word is an empty string */
66 if (x + width > vp_width - MARGIN) {
67 x = MARGIN;
68 y = y + height;
69 }
70 /* .. or if the word is the empty string */
71 if (rb->strcmp(text[i], "")==0) { 66 if (rb->strcmp(text[i], "")==0) {
72 x = MARGIN; 67 x = MARGIN;
73 y = y + height; 68 y = y + height;
74 continue; 69 continue;
70 /* .. or if the current one can't fit the word */
71 } else if (x + width > vp_width - MARGIN) {
72 x = MARGIN;
73 y = y + height;
75 } 74 }
76 /* display the remaining text by button click or exit */ 75 /* display the remaining text by button click or exit */
77 if (y + height > vp_height - MARGIN) { 76 if (y + height > vp_height - MARGIN) {