diff options
Diffstat (limited to 'firmware/drivers/lcd-h100.c')
-rw-r--r-- | firmware/drivers/lcd-h100.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c index 3af6ffef6a..78b1e33dc8 100644 --- a/firmware/drivers/lcd-h100.c +++ b/firmware/drivers/lcd-h100.c | |||
@@ -658,9 +658,9 @@ void lcd_fillrect(int x, int y, int width, int height) | |||
658 | int ny; | 658 | int ny; |
659 | unsigned char *dst, *dst_end; | 659 | unsigned char *dst, *dst_end; |
660 | unsigned mask, mask_bottom; | 660 | unsigned mask, mask_bottom; |
661 | unsigned bits = fg_pattern; | 661 | unsigned bits = 0; |
662 | lcd_blockfunc_type *bfunc; | 662 | lcd_blockfunc_type *bfunc; |
663 | bool fillopt; | 663 | bool fillopt = false; |
664 | 664 | ||
665 | /* nothing to draw? */ | 665 | /* nothing to draw? */ |
666 | if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT) | 666 | if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT) |
@@ -683,10 +683,22 @@ void lcd_fillrect(int x, int y, int width, int height) | |||
683 | if (y + height > LCD_HEIGHT) | 683 | if (y + height > LCD_HEIGHT) |
684 | height = LCD_HEIGHT - y; | 684 | height = LCD_HEIGHT - y; |
685 | 685 | ||
686 | fillopt = (drawmode & DRMODE_INVERSEVID) ? | 686 | if (drawmode & DRMODE_INVERSEVID) |
687 | (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG); | 687 | { |
688 | if (fillopt &&(drawmode & DRMODE_INVERSEVID)) | 688 | if (drawmode & DRMODE_BG) |
689 | bits = bg_pattern; | 689 | { |
690 | fillopt = true; | ||
691 | bits = bg_pattern; | ||
692 | } | ||
693 | } | ||
694 | else | ||
695 | { | ||
696 | if (drawmode & DRMODE_FG) | ||
697 | { | ||
698 | fillopt = true; | ||
699 | bits = fg_pattern; | ||
700 | } | ||
701 | } | ||
690 | bfunc = lcd_blockfuncs[drawmode]; | 702 | bfunc = lcd_blockfuncs[drawmode]; |
691 | dst = &lcd_framebuffer[y>>2][x]; | 703 | dst = &lcd_framebuffer[y>>2][x]; |
692 | ny = height - 1 + (y & 3); | 704 | ny = height - 1 + (y & 3); |