https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c87be643f844a276f69d7…
commit c87be643f844a276f69d759dd2652b7eff02086d
Author: Dmitry Borisov <di.sean(a)protonmail.com>
AuthorDate: Mon Jul 27 23:57:45 2020 +0600
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Wed Jul 29 19:10:39 2020 +0300
[BOOTVID] Improve text scrolling performance for PC-98 (#2936)
---
drivers/base/bootvid/i386/pc98/bootvid.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/base/bootvid/i386/pc98/bootvid.c
b/drivers/base/bootvid/i386/pc98/bootvid.c
index 459c8e07ca4..0563da8a5e0 100644
--- a/drivers/base/bootvid/i386/pc98/bootvid.c
+++ b/drivers/base/bootvid/i386/pc98/bootvid.c
@@ -283,24 +283,24 @@ PreserveRow(
_In_ ULONG TopDelta,
_In_ BOOLEAN Restore)
{
- PUCHAR OldPosition, NewPosition;
- ULONG PixelCount = TopDelta * SCREEN_WIDTH;
+ PULONG OldPosition, NewPosition;
+ ULONG PixelCount = TopDelta * (SCREEN_WIDTH / sizeof(ULONG));
if (Restore)
{
/* Restore the row by copying back the contents saved off-screen */
- OldPosition = (PUCHAR)(FrameBuffer + FB_OFFSET(0, SCREEN_HEIGHT));
- NewPosition = (PUCHAR)(FrameBuffer + FB_OFFSET(0, CurrentTop));
+ OldPosition = (PULONG)(FrameBuffer + FB_OFFSET(0, SCREEN_HEIGHT));
+ NewPosition = (PULONG)(FrameBuffer + FB_OFFSET(0, CurrentTop));
}
else
{
/* Preserve the row by saving its contents off-screen */
- OldPosition = (PUCHAR)(FrameBuffer + FB_OFFSET(0, CurrentTop));
- NewPosition = (PUCHAR)(FrameBuffer + FB_OFFSET(0, SCREEN_HEIGHT));
+ OldPosition = (PULONG)(FrameBuffer + FB_OFFSET(0, CurrentTop));
+ NewPosition = (PULONG)(FrameBuffer + FB_OFFSET(0, SCREEN_HEIGHT));
}
while (PixelCount--)
- WRITE_REGISTER_UCHAR(NewPosition++, READ_REGISTER_UCHAR(OldPosition++));
+ WRITE_REGISTER_ULONG(NewPosition++, READ_REGISTER_ULONG(OldPosition++));
}
VOID