mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[BOOTVID] Improve text scrolling performance for PC-98 (#2936)
This commit is contained in:
parent
5d40981efa
commit
c87be643f8
1 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue