[BOOTVID] Fix drawing strings on top of the bitmap (#2936)

Also fix VGA pixel drawing.

CORE-15896
This commit is contained in:
Dmitry Borisov 2020-06-20 17:21:42 +06:00 committed by Stanislav Motylkov
parent 9d2ecd3a13
commit 4d54b8ce69
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92
2 changed files with 7 additions and 2 deletions

View file

@ -43,8 +43,11 @@ SetPixel(
/* Select the bitmask register and write the mask */
__outpw(VGA_BASE_IO_PORT + GRAPH_ADDRESS_PORT, (PixelMask[Left & 7] << 8) | IND_BIT_MASK);
/* Read the current pixel value and add our color */
WRITE_REGISTER_UCHAR(PixelPosition, READ_REGISTER_UCHAR(PixelPosition) & Color);
/* Dummy read to load latch registers */
(VOID)READ_REGISTER_UCHAR(PixelPosition);
/* Set the new color */
WRITE_REGISTER_UCHAR(PixelPosition, Color);
}
VOID

View file

@ -94,6 +94,8 @@ PrepareForSetPixel(VOID)
do { \
/* Select the bitmask register and write the mask */ \
__outpw(VGA_BASE_IO_PORT + GRAPH_ADDRESS_PORT, ((_PixelMask) << 8) | IND_BIT_MASK); \
/* Dummy read to load latch registers */ \
(VOID)READ_REGISTER_UCHAR((_PixelPtr)); \
/* Set the new color */ \
WRITE_REGISTER_UCHAR((_PixelPtr), (UCHAR)(_TextColor)); \
} while (0);