From b018f890495ecc2b5fb4d04e5133ab2ae854f494 Mon Sep 17 00:00:00 2001 From: Johannes Schwarz Date: Wed, 15 Jul 2009 15:14:17 +0000 Subject: 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 --- apps/plugins/lib/display_text.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'apps/plugins') 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, 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) { -- cgit v1.2.3