From d3424f0f51f564c6408b7d27fe3bc89fbfaba87d Mon Sep 17 00:00:00 2001 From: Tomas Salfischberger Date: Wed, 6 Jul 2005 19:33:46 +0000 Subject: [PATCH] Fixed the "overwriting bug" with aligned lines in the WPS. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7042 a1c6a512-1295-4272-9138-f99709370657 --- apps/wps-display.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/wps-display.c b/apps/wps-display.c index ab62a91d9e..8c6de43a20 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c @@ -1138,6 +1138,11 @@ bool wps_refresh(struct mp3entry* id3, if (strw>LCD_WIDTH) { lcd_puts_scroll(0, i, buf); } else { + /* clear the line first */ + lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); + lcd_fillrect(0, ypos, LCD_WIDTH, strh); + lcd_set_drawmode(DRMODE_SOLID); + if (flags & WPS_ALIGN_CENTER) { xpos = (LCD_WIDTH - strw) / 2; @@ -1168,6 +1173,12 @@ bool wps_refresh(struct mp3entry* id3, lcd_getstringsize(buf, &strw, &strh); ypos = (i*strh)+lcd_getymargin(); update_line = true; + + /* clear the line first */ + lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); + lcd_fillrect(0, ypos, LCD_WIDTH, strh); + lcd_set_drawmode(DRMODE_SOLID); + if (flags & WPS_ALIGN_CENTER) { xpos = (LCD_WIDTH - strw) / 2; lcd_putsxy(xpos, ypos, buf);