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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c
index 8914e272ec..d75b989dd2 100644
--- a/firmware/drivers/lcd-recorder.c
+++ b/firmware/drivers/lcd-recorder.c
@@ -933,7 +933,7 @@ void lcd_puts_offset(int x, int y, const unsigned char *str, int offset)
933void lcd_puts_style_offset(int x, int y, const unsigned char *str, 933void lcd_puts_style_offset(int x, int y, const unsigned char *str,
934 int style, int offset) 934 int style, int offset)
935{ 935{
936 int xpos,ypos,w,h; 936 int xpos,ypos,w,h,xrect;
937 int lastmode = drawmode; 937 int lastmode = drawmode;
938 938
939 /* make sure scrolling is turned off on the line we are updating */ 939 /* make sure scrolling is turned off on the line we are updating */
@@ -949,7 +949,8 @@ void lcd_puts_style_offset(int x, int y, const unsigned char *str,
949 (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID; 949 (DRMODE_SOLID|DRMODE_INVERSEVID) : DRMODE_SOLID;
950 lcd_putsxyofs(xpos, ypos, offset, str); 950 lcd_putsxyofs(xpos, ypos, offset, str);
951 drawmode ^= DRMODE_INVERSEVID; 951 drawmode ^= DRMODE_INVERSEVID;
952 lcd_fillrect(xpos + w - offset, ypos, LCD_WIDTH - (xpos + w - offset), h); 952 xrect = xpos + MAX(w - offset, 0);
953 lcd_fillrect(xrect, ypos, LCD_WIDTH - xrect, h);
953 drawmode = lastmode; 954 drawmode = lastmode;
954} 955}
955 956