diff options
Diffstat (limited to 'firmware/drivers/lcd-h100.c')
-rw-r--r-- | firmware/drivers/lcd-h100.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c index 85b8b0229e..42bf13a888 100644 --- a/firmware/drivers/lcd-h100.c +++ b/firmware/drivers/lcd-h100.c | |||
@@ -1081,7 +1081,7 @@ void lcd_puts_offset(int x, int y, const unsigned char *str, int offset) | |||
1081 | void lcd_puts_style_offset(int x, int y, const unsigned char *str, | 1081 | void lcd_puts_style_offset(int x, int y, const unsigned char *str, |
1082 | int style, int offset) | 1082 | int style, int offset) |
1083 | { | 1083 | { |
1084 | int xpos,ypos,w,h; | 1084 | int xpos,ypos,w,h,xrect; |
1085 | int lastmode = drawmode; | 1085 | int lastmode = drawmode; |
1086 | 1086 | ||
1087 | /* make sure scrolling is turned off on the line we are updating */ | 1087 | /* make sure scrolling is turned off on the line we are updating */ |
@@ -1097,7 +1097,8 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str, | |||
1097 | (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; | 1097 | (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; |
1098 | lcd_putsxyofs(xpos, ypos, offset, str); | 1098 | lcd_putsxyofs(xpos, ypos, offset, str); |
1099 | drawmode ^= DRMODE_INVERSEVID; | 1099 | drawmode ^= DRMODE_INVERSEVID; |
1100 | lcd_fillrect(xpos + w - offset, ypos, LCD_WIDTH - (xpos + w - offset), h); | 1100 | xrect = xpos + MAX(w - offset, 0); |
1101 | lcd_fillrect(xrect, ypos, LCD_WIDTH - xrect, h); | ||
1101 | drawmode = lastmode; | 1102 | drawmode = lastmode; |
1102 | } | 1103 | } |
1103 | 1104 | ||