summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c
index 249253487d..e2cc454e14 100644
--- a/firmware/drivers/lcd.c
+++ b/firmware/drivers/lcd.c
@@ -914,12 +914,20 @@ void lcd_getfontsize(unsigned int font, int *width, int *height)
914void lcd_puts_scroll(int x, int y, char* string ) 914void lcd_puts_scroll(int x, int y, char* string )
915{ 915{
916 struct scrollinfo* s = &scroll; 916 struct scrollinfo* s = &scroll;
917 char *ch;
917#ifdef HAVE_LCD_CHARCELLS 918#ifdef HAVE_LCD_CHARCELLS
918 s->space = 11 - x; 919 s->space = 11 - x;
919#else 920#else
920 int width, height; 921 int width, height;
921 lcd_getfontsize(font, &width, &height); 922 lcd_getfontsize(font, &width, &height);
923#ifndef LCD_PROPFONTS
922 s->space = (LCD_WIDTH - xmargin - x*width) / width; 924 s->space = (LCD_WIDTH - xmargin - x*width) / width;
925#else
926 ch = string;
927 width = 0;
928 for (s->space = 0; width + (char_dw_8x8_prop[*ch][8]>>4) < LCD_WIDTH - x;
929 width += (char_dw_8x8_prop[*ch][8]>>4), ch++, s->space++);
930#endif
923#endif 931#endif
924 lcd_puts(x,y,string); 932 lcd_puts(x,y,string);
925 s->textlen = strlen(string); 933 s->textlen = strlen(string);
@@ -941,6 +949,12 @@ void lcd_stop_scroll(void)
941 struct scrollinfo* s = &scroll; 949 struct scrollinfo* s = &scroll;
942 scroll_count = 0; 950 scroll_count = 0;
943 951
952#ifdef LCD_PROPFONTS
953 lcd_clearrect(xmargin + s->startx*fonts[font],
954 ymargin + s->starty*fontheight[font],
955 LCD_WIDTH - xmargin,
956 fontheight[font]);
957#endif
944 /* restore scrolled row */ 958 /* restore scrolled row */
945 lcd_puts(s->startx,s->starty,s->text); 959 lcd_puts(s->startx,s->starty,s->text);
946 lcd_update(); 960 lcd_update();