Index: lcd.c =================================================================== RCS file: /cvsroot/rockbox/firmware/drivers/lcd.c,v retrieving revision 1.95 diff -u -b -r1.95 lcd.c --- lcd.c 6 Sep 2002 12:30:30 -0000 1.95 +++ lcd.c 8 Sep 2002 06:19:15 -0000 @@ -415,9 +415,12 @@ void lcd_puts(int x, int y, unsigned char *string) { + int i; lcd_write(true,LCD_CURSOR(x,y)); - while (*string && x++<11) + for (i=0; *string && x++<11; i++) lcd_write(false,lcd_ascii[*(unsigned char*)string++]); + for (;i<32;i++) + lcd_write(false,lcd_ascii[' ']); } void lcd_putc(int x, int y, unsigned char ch) @@ -879,19 +882,38 @@ return; #ifdef LCD_PROPFONTS + { + int w,h; + lcd_getstringsize(str, font, &w, &h); lcd_putspropxy( xmargin + x*fonts[font], ymargin + y*fontheight[font], str, font ); + lcd_clearrect(xmargin + x*fonts[font] + w, + ymargin + y*h, + LCD_WIDTH - (xmargin + x*fonts[font] + w), + h); + } #elif LOADABLE_FONTS { int w,h; lcd_getstringsize(str,_font,&w,&h); lcd_putsldfxy( xmargin + x*w/strlen(str), ymargin + y*h, str ); + lcd_clearrect(xmargin + x*w/strlen(str) + w, + ymargin + y*h, + LCD_WIDTH - (x*w/strlen(str) + w), + y); } #else + { + int len = strlen(str); lcd_putsxy( xmargin + x*fonts[font], ymargin + y*fontheight[font], str, font ); + lcd_clearrect(xmargin + x*fonts[font] + len*fonts[font], + ymargin + y*fontheight[font], + LCD_WIDTH - (xmargin + x*fonts[font] + len*fonts[font]), + fontheight[font]); + } #endif #if defined(SIMULATOR) && defined(HAVE_LCD_CHARCELLS) /* this function is being used when simulating a charcell LCD and