diff options
Diffstat (limited to 'firmware/drivers/lcd-16bit.c')
-rw-r--r-- | firmware/drivers/lcd-16bit.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index 44e42ad617..16c97c9e99 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c | |||
@@ -807,6 +807,7 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, | |||
807 | { | 807 | { |
808 | int xpos,ypos,w,h,xrect; | 808 | int xpos,ypos,w,h,xrect; |
809 | int lastmode = drawmode; | 809 | int lastmode = drawmode; |
810 | int oldcolor = fg_pattern; | ||
810 | 811 | ||
811 | /* make sure scrolling is turned off on the line we are updating */ | 812 | /* make sure scrolling is turned off on the line we are updating */ |
812 | scrolling_lines &= ~(1 << y); | 813 | scrolling_lines &= ~(1 << y); |
@@ -819,11 +820,15 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, | |||
819 | ypos = ymargin + y*h; | 820 | ypos = ymargin + y*h; |
820 | drawmode = (style & STYLE_INVERT) ? | 821 | drawmode = (style & STYLE_INVERT) ? |
821 | (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; | 822 | (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; |
823 | if (drawmode == DRMODE_SOLID && style & STYLE_COLORED) { | ||
824 | fg_pattern = style & STYLE_COLOR_MASK; | ||
825 | } | ||
822 | lcd_putsxyofs(xpos, ypos, offset, str); | 826 | lcd_putsxyofs(xpos, ypos, offset, str); |
823 | drawmode ^= DRMODE_INVERSEVID; | 827 | drawmode ^= DRMODE_INVERSEVID; |
824 | xrect = xpos + MAX(w - offset, 0); | 828 | xrect = xpos + MAX(w - offset, 0); |
825 | lcd_fillrect(xrect, ypos, LCD_WIDTH - xrect, h); | 829 | lcd_fillrect(xrect, ypos, LCD_WIDTH - xrect, h); |
826 | drawmode = lastmode; | 830 | drawmode = lastmode; |
831 | fg_pattern = oldcolor; | ||
827 | } | 832 | } |
828 | 833 | ||
829 | /*** scrolling ***/ | 834 | /*** scrolling ***/ |
@@ -896,10 +901,8 @@ void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string, | |||
896 | s->invert = false; | 901 | s->invert = false; |
897 | if (style & STYLE_INVERT) { | 902 | if (style & STYLE_INVERT) { |
898 | s->invert = true; | 903 | s->invert = true; |
899 | lcd_puts_style_offset(x,y,string,STYLE_INVERT,offset); | ||
900 | } | 904 | } |
901 | else | 905 | lcd_puts_style_offset(x,y,string,style,offset); |
902 | lcd_puts_offset(x,y,string,offset); | ||
903 | 906 | ||
904 | lcd_getstringsize(string, &w, &h); | 907 | lcd_getstringsize(string, &w, &h); |
905 | 908 | ||