Fix for PutScreenImage in OSX
This commit is contained in:
parent
c29159670e
commit
d521a9ad86
|
@ -360,13 +360,13 @@ Begin
|
||||||
|
|
||||||
If FCursorY < FWinBot Then
|
If FCursorY < FWinBot Then
|
||||||
Inc (FCursorY)
|
Inc (FCursorY)
|
||||||
Else
|
Else Begin
|
||||||
ScrollWindow;
|
ScrollWindow;
|
||||||
|
|
||||||
BufFlush;
|
BufFlush;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
End;
|
||||||
|
|
||||||
Procedure TOutputDarwin.WriteStr (Str: String);
|
Procedure TOutputDarwin.WriteStr (Str: String);
|
||||||
Var
|
Var
|
||||||
|
@ -579,20 +579,28 @@ Procedure TOutputDarwin.PutScreenImage (Image: TConsoleImageRec);
|
||||||
Var
|
Var
|
||||||
CountX : Byte;
|
CountX : Byte;
|
||||||
CountY : Byte;
|
CountY : Byte;
|
||||||
|
OT, OB : Byte;
|
||||||
Begin
|
Begin
|
||||||
|
OT := FWinTop;
|
||||||
|
OB := FWinBot;
|
||||||
|
|
||||||
|
SetWindow (1, 1, 80, ScreenSize, False);
|
||||||
|
|
||||||
For CountY := Image.Y1 to Image.Y2 Do Begin
|
For CountY := Image.Y1 to Image.Y2 Do Begin
|
||||||
CursorXY (Image.X1, CountY);
|
CursorXY (Image.X1, CountY);
|
||||||
|
|
||||||
|
// Move (Image.Data[CountY][Image.X1], Buffer[CountY + Image.Y1 - 1][Image.X1], (Image.X2 - Image.X1 + 1) * SizeOf(TCharInfo));
|
||||||
|
|
||||||
For CountX := Image.X1 to Image.X2 Do Begin
|
For CountX := Image.X1 to Image.X2 Do Begin
|
||||||
SetTextAttr(Image.Data[CountY][CountX].Attributes);
|
SetTextAttr(Image.Data[CountY][CountX].Attributes);
|
||||||
If Image.Data[CountY][CountX].UnicodeChar = #0 Then BufAddStr(' ') Else BufAddStr(Image.Data[CountY][CountX].UnicodeChar);
|
If Image.Data[CountY][CountX].UnicodeChar = #0 Then BufAddStr(' ') Else BufAddStr(Image.Data[CountY][CountX].UnicodeChar);
|
||||||
// the above is a placeholder until we properly fill the buffers. #0 does not work in ITERM2
|
|
||||||
Buffer[CountY][CountX] := Image.Data[CountY][CountX];
|
Buffer[CountY][CountX] := Image.Data[CountY][CountX];
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
SetTextAttr (Image.CursorA);
|
SetTextAttr (Image.CursorA);
|
||||||
CursorXY (Image.CursorX, Image.CursorY);
|
CursorXY (Image.CursorX, Image.CursorY);
|
||||||
|
SetWindow (1, OT, 80, OB, False);
|
||||||
|
|
||||||
BufFlush;
|
BufFlush;
|
||||||
End;
|
End;
|
||||||
|
|
Loading…
Reference in New Issue