summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-16bit.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-16bit.c')
-rw-r--r--firmware/drivers/lcd-16bit.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c
index 4a6348f9db..2153b692f3 100644
--- a/firmware/drivers/lcd-16bit.c
+++ b/firmware/drivers/lcd-16bit.c
@@ -675,15 +675,11 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, int style, in
675 lcd_getstringsize(str, &w, &h); 675 lcd_getstringsize(str, &w, &h);
676 xpos = xmargin + x*w / utf8length(str); 676 xpos = xmargin + x*w / utf8length(str);
677 ypos = ymargin + y*h; 677 ypos = ymargin + y*h;
678 drawmode = (style & STYLE_INVERT) ?
679 (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
678 lcd_putsxyofs(xpos, ypos, offset, str); 680 lcd_putsxyofs(xpos, ypos, offset, str);
679 drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); 681 drawmode ^= DRMODE_INVERSEVID;
680 (void)style;
681 lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h); 682 lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h);
682 if (style & STYLE_INVERT)
683 {
684 drawmode = DRMODE_COMPLEMENT;
685 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, h);
686 }
687 drawmode = lastmode; 683 drawmode = lastmode;
688} 684}
689 685
@@ -854,15 +850,9 @@ static void scroll_thread(void)
854 } 850 }
855 851
856 lastmode = drawmode; 852 lastmode = drawmode;
857 drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); 853 drawmode = s->invert ?
858 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 854 (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
859 drawmode = DRMODE_SOLID;
860 lcd_putsxyofs(xpos, ypos, s->offset, s->line); 855 lcd_putsxyofs(xpos, ypos, s->offset, s->line);
861 if (s->invert)
862 {
863 drawmode = DRMODE_COMPLEMENT;
864 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
865 }
866 drawmode = lastmode; 856 drawmode = lastmode;
867 lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 857 lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
868 } 858 }