rtl-console: quickfix for Amiga UpdateScreenArea() so it properly updates multiple lines

This commit is contained in:
Karoly Balogh 2021-12-28 15:50:34 +01:00
parent cbc8aa63c8
commit 2f82a084e8

View File

@ -572,6 +572,7 @@ var
LocalRP: PRastPort;
sY, sX: LongInt;
BufStartOfs: LongInt;
BufLineDiff: Longint;
{$ifdef VideoSpeedTest}
NumChanged: Integer;
t,ta: Double;
@ -615,12 +616,13 @@ begin
if Smallforce then
begin
BufStartOfs:=y1 * ScreenWidth + x1;
VBuf:=@VideoBuf^[BufStartOfs];
OldVBuf:=@OldVideoBuf^[BufStartOfs];
{$ifdef VideoSpeedTest}
t := now();
{$endif}
BufStartOfs:=Y1 * ScreenWidth + X1;
BufLineDiff:=ScreenWidth-(X2-X1+1);
VBuf:=@VideoBuf^[BufStartOfs];
OldVBuf:=@OldVideoBuf^[BufStartOfs];
sY := videoWindow^.borderTop + Y1 * VideoFontHeight;
for CounterY := Y1 to Y2 do
begin
@ -640,6 +642,8 @@ begin
Inc(OldVBuf);
sX := sX + 8;
end;
Inc(VBuf,BufLineDiff);
Inc(OldVBuf,BufLineDiff);
sY := sY + VideoFontHeight;
end;
{$ifdef VideoSpeedTest}