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.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c
index f69bf21fd5..22388815ae 100644
--- a/firmware/drivers/lcd-recorder.c
+++ b/firmware/drivers/lcd-recorder.c
@@ -677,9 +677,9 @@ void lcd_fillrect(int x, int y, int width, int height)
677 int ny; 677 int ny;
678 unsigned char *dst, *dst_end; 678 unsigned char *dst, *dst_end;
679 unsigned mask, mask_bottom; 679 unsigned mask, mask_bottom;
680 unsigned bits = 0xFFu; 680 unsigned bits = 0;
681 lcd_blockfunc_type *bfunc; 681 lcd_blockfunc_type *bfunc;
682 bool fillopt; 682 bool fillopt = false;
683 683
684 /* nothing to draw? */ 684 /* nothing to draw? */
685 if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT) 685 if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT)
@@ -701,11 +701,22 @@ void lcd_fillrect(int x, int y, int width, int height)
701 width = LCD_WIDTH - x; 701 width = LCD_WIDTH - x;
702 if (y + height > LCD_HEIGHT) 702 if (y + height > LCD_HEIGHT)
703 height = LCD_HEIGHT - y; 703 height = LCD_HEIGHT - y;
704 704
705 fillopt = (drawmode & DRMODE_INVERSEVID) ? 705 if (drawmode & DRMODE_INVERSEVID)
706 (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG); 706 {
707 if (fillopt &&(drawmode & DRMODE_INVERSEVID)) 707 if (drawmode & DRMODE_BG)
708 bits = 0; 708 {
709 fillopt = true;
710 }
711 }
712 else
713 {
714 if (drawmode & DRMODE_FG)
715 {
716 fillopt = true;
717 bits = 0xFFu;
718 }
719 }
709 bfunc = lcd_blockfuncs[drawmode]; 720 bfunc = lcd_blockfuncs[drawmode];
710 dst = &lcd_framebuffer[y>>3][x]; 721 dst = &lcd_framebuffer[y>>3][x];
711 ny = height - 1 + (y & 7); 722 ny = height - 1 + (y & 7);