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
This commit is contained in:
Tomas Salfischberger 2005-07-06 19:33:46 +00:00
parent 6b582c3b92
commit d3424f0f51

View file

@ -1138,6 +1138,11 @@ bool wps_refresh(struct mp3entry* id3,
if (strw>LCD_WIDTH) { if (strw>LCD_WIDTH) {
lcd_puts_scroll(0, i, buf); lcd_puts_scroll(0, i, buf);
} else { } 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) if (flags & WPS_ALIGN_CENTER)
{ {
xpos = (LCD_WIDTH - strw) / 2; xpos = (LCD_WIDTH - strw) / 2;
@ -1168,6 +1173,12 @@ bool wps_refresh(struct mp3entry* id3,
lcd_getstringsize(buf, &strw, &strh); lcd_getstringsize(buf, &strw, &strh);
ypos = (i*strh)+lcd_getymargin(); ypos = (i*strh)+lcd_getymargin();
update_line = true; 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) { if (flags & WPS_ALIGN_CENTER) {
xpos = (LCD_WIDTH - strw) / 2; xpos = (LCD_WIDTH - strw) / 2;
lcd_putsxy(xpos, ypos, buf); lcd_putsxy(xpos, ypos, buf);