diff options
Diffstat (limited to 'firmware/drivers/lcd-h100-remote.c')
-rw-r--r-- | firmware/drivers/lcd-h100-remote.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c index 6bbe01a4c9..df735ca40d 100644 --- a/firmware/drivers/lcd-h100-remote.c +++ b/firmware/drivers/lcd-h100-remote.c | |||
@@ -916,9 +916,9 @@ void lcd_remote_fillrect(int x, int y, int width, int height) | |||
916 | int ny; | 916 | int ny; |
917 | unsigned char *dst, *dst_end; | 917 | unsigned char *dst, *dst_end; |
918 | unsigned mask, mask_bottom; | 918 | unsigned mask, mask_bottom; |
919 | unsigned bits = 0xFFu; | 919 | unsigned bits = 0; |
920 | lcd_blockfunc_type *bfunc; | 920 | lcd_blockfunc_type *bfunc; |
921 | bool fillopt; | 921 | bool fillopt = false; |
922 | 922 | ||
923 | /* nothing to draw? */ | 923 | /* nothing to draw? */ |
924 | if ((width <= 0) || (height <= 0) || (x >= LCD_REMOTE_WIDTH) | 924 | if ((width <= 0) || (height <= 0) || (x >= LCD_REMOTE_WIDTH) |
@@ -941,10 +941,21 @@ void lcd_remote_fillrect(int x, int y, int width, int height) | |||
941 | if (y + height > LCD_REMOTE_HEIGHT) | 941 | if (y + height > LCD_REMOTE_HEIGHT) |
942 | height = LCD_REMOTE_HEIGHT - y; | 942 | height = LCD_REMOTE_HEIGHT - y; |
943 | 943 | ||
944 | fillopt = (drawmode & DRMODE_INVERSEVID) ? | 944 | if (drawmode & DRMODE_INVERSEVID) |
945 | (drawmode & DRMODE_BG) : (drawmode & DRMODE_FG); | 945 | { |
946 | if (fillopt &&(drawmode & DRMODE_INVERSEVID)) | 946 | if (drawmode & DRMODE_BG) |
947 | bits = 0; | 947 | { |
948 | fillopt = true; | ||
949 | } | ||
950 | } | ||
951 | else | ||
952 | { | ||
953 | if (drawmode & DRMODE_FG) | ||
954 | { | ||
955 | fillopt = true; | ||
956 | bits = 0xFFu; | ||
957 | } | ||
958 | } | ||
948 | bfunc = lcd_remote_blockfuncs[drawmode]; | 959 | bfunc = lcd_remote_blockfuncs[drawmode]; |
949 | dst = &lcd_remote_framebuffer[y>>3][x]; | 960 | dst = &lcd_remote_framebuffer[y>>3][x]; |
950 | ny = height - 1 + (y & 7); | 961 | ny = height - 1 + (y & 7); |