https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4d54b8ce6954afa09b136…
commit 4d54b8ce6954afa09b136a7cfe3a1cafb2bda7eb
Author: Dmitry Borisov <di.sean(a)protonmail.com>
AuthorDate: Sat Jun 20 17:21:42 2020 +0600
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Wed Jul 29 19:10:38 2020 +0300
[BOOTVID] Fix drawing strings on top of the bitmap (#2936)
Also fix VGA pixel drawing.
CORE-15896
---
drivers/base/bootvid/i386/pc/pc.h | 7 +++++--
drivers/base/bootvid/i386/pc/vga.c | 2 ++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/base/bootvid/i386/pc/pc.h b/drivers/base/bootvid/i386/pc/pc.h
index c1a96e797a6..c299a1ecd81 100644
--- a/drivers/base/bootvid/i386/pc/pc.h
+++ b/drivers/base/bootvid/i386/pc/pc.h
@@ -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
diff --git a/drivers/base/bootvid/i386/pc/vga.c b/drivers/base/bootvid/i386/pc/vga.c
index b985bc68eb1..3f6c9bc703c 100644
--- a/drivers/base/bootvid/i386/pc/vga.c
+++ b/drivers/base/bootvid/i386/pc/vga.c
@@ -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);