summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-h100.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-h100.c')
-rw-r--r--firmware/drivers/lcd-h100.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c
index 685984522d..ef32078afb 100644
--- a/firmware/drivers/lcd-h100.c
+++ b/firmware/drivers/lcd-h100.c
@@ -845,7 +845,7 @@ void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y,
845 unsigned mask_col = mask; 845 unsigned mask_col = mask;
846 unsigned data = 0; 846 unsigned data = 0;
847 847
848 for (y = ny; y >= 8; y -= 8) 848 for (y = ny; y >= 8; y -= 8)
849 { 849 {
850 data |= *src_col << shift; 850 data |= *src_col << shift;
851 851
@@ -1090,14 +1090,11 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str,
1090 lcd_getstringsize(str, &w, &h); 1090 lcd_getstringsize(str, &w, &h);
1091 xpos = xmargin + x*w / utf8length((char *)str); 1091 xpos = xmargin + x*w / utf8length((char *)str);
1092 ypos = ymargin + y*h; 1092 ypos = ymargin + y*h;
1093 drawmode = (style & STYLE_INVERT) ?
1094 (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
1093 lcd_putsxyofs(xpos, ypos, offset, str); 1095 lcd_putsxyofs(xpos, ypos, offset, str);
1094 drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); 1096 drawmode ^= DRMODE_INVERSEVID;
1095 lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h); 1097 lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h);
1096 if (style & STYLE_INVERT)
1097 {
1098 drawmode = DRMODE_COMPLEMENT;
1099 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, h);
1100 }
1101 drawmode = lastmode; 1098 drawmode = lastmode;
1102} 1099}
1103 1100
@@ -1266,15 +1263,9 @@ static void scroll_thread(void)
1266 } 1263 }
1267 1264
1268 lastmode = drawmode; 1265 lastmode = drawmode;
1269 drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID); 1266 drawmode = s->invert ?
1270 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 1267 (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
1271 drawmode = DRMODE_SOLID; 1268 lcd_putsxyofs(xpos, ypos, s->offset, s->line);
1272 lcd_putsxyofs(xpos, ypos, s->offset, (unsigned char *)s->line);
1273 if (s->invert)
1274 {
1275 drawmode = DRMODE_COMPLEMENT;
1276 lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
1277 }
1278 drawmode = lastmode; 1269 drawmode = lastmode;
1279 lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 1270 lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
1280 } 1271 }