summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-recorder.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-recorder.c')
-rw-r--r--firmware/drivers/lcd-recorder.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c
index 37a15961d5..b3696d7db5 100644
--- a/firmware/drivers/lcd-recorder.c
+++ b/firmware/drivers/lcd-recorder.c
@@ -885,7 +885,7 @@ void lcd_putsxy(int x, int y, const unsigned char *str)
885void lcd_puts_style(int x, int y, const unsigned char *str, int style) 885void lcd_puts_style(int x, int y, const unsigned char *str, int style)
886{ 886{
887 int xpos,ypos,w,h; 887 int xpos,ypos,w,h;
888 int lastmode = lcd_get_drawmode(); 888 int lastmode = drawmode;
889 889
890 /* make sure scrolling is turned off on the line we are updating */ 890 /* make sure scrolling is turned off on the line we are updating */
891 scrolling_lines &= ~(1 << y); 891 scrolling_lines &= ~(1 << y);
@@ -897,14 +897,14 @@ void lcd_puts_style(int x, int y, const unsigned char *str, int style)
897 xpos = xmargin + x*w / strlen(str); 897 xpos = xmargin + x*w / strlen(str);
898 ypos = ymargin + y*h; 898 ypos = ymargin + y*h;
899 lcd_putsxy(xpos, ypos, str); 899 lcd_putsxy(xpos, ypos, str);
900 lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 900 drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID);
901 lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h); 901 lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h);
902 if (style & STYLE_INVERT) 902 if (style & STYLE_INVERT)
903 { 903 {
904 lcd_set_drawmode(DRMODE_COMPLEMENT); 904 drawmode = DRMODE_COMPLEMENT;
905 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, h); 905 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, h);
906 } 906 }
907 lcd_set_drawmode(lastmode); 907 drawmode = lastmode;
908} 908}
909 909
910/* put a string at a given char position */ 910/* put a string at a given char position */
@@ -1066,17 +1066,17 @@ static void scroll_thread(void)
1066 s->offset %= s->width; 1066 s->offset %= s->width;
1067 } 1067 }
1068 1068
1069 lastmode = lcd_get_drawmode(); 1069 lastmode = drawmode;
1070 lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 1070 drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID);
1071 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 1071 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
1072 lcd_set_drawmode(DRMODE_SOLID); 1072 drawmode = DRMODE_SOLID;
1073 lcd_putsxyofs(xpos, ypos, s->offset, s->line); 1073 lcd_putsxyofs(xpos, ypos, s->offset, s->line);
1074 if (s->invert) 1074 if (s->invert)
1075 { 1075 {
1076 lcd_set_drawmode(DRMODE_COMPLEMENT); 1076 drawmode = DRMODE_COMPLEMENT;
1077 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 1077 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
1078 } 1078 }
1079 lcd_set_drawmode(lastmode); 1079 drawmode = lastmode;
1080 lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 1080 lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
1081 } 1081 }
1082 1082