|
@@ -61,31 +61,13 @@ begin
|
|
MaxVideoBufSize:= ScreenWidth * ScreenHeight * 2;
|
|
MaxVideoBufSize:= ScreenWidth * ScreenHeight * 2;
|
|
VideoBufSize := ScreenWidth * ScreenHeight * 2;
|
|
VideoBufSize := ScreenWidth * ScreenHeight * 2;
|
|
|
|
|
|
- GetMem(VideoBuf,MaxVideoBufSize);
|
|
|
|
- GetMem(OldVideoBuf,MaxVideoBufSize);
|
|
|
|
- VideoBufAllocated := true;
|
|
|
|
-
|
|
|
|
- {grab current screen contents}
|
|
|
|
- _CopyFromScreenMemory (ScreenHeight, ScreenWidth, VideoBuf, 0, 0);
|
|
|
|
- Move (VideoBuf^, OldVideoBuf^, MaxVideoBufSize);
|
|
|
|
LockUpdateScreen := 0;
|
|
LockUpdateScreen := 0;
|
|
-
|
|
|
|
- {ClearScreen; not needed PM }
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure SysDoneVideo;
|
|
procedure SysDoneVideo;
|
|
begin
|
|
begin
|
|
- { ClearScreen; also not needed PM }
|
|
|
|
SetCursorType(crUnderLine);
|
|
SetCursorType(crUnderLine);
|
|
- { SetCursorPos(0,0); also not needed PM }
|
|
|
|
- if videoBufAllocated then
|
|
|
|
- begin
|
|
|
|
- FreeMem(VideoBuf,MaxVideoBufSize);
|
|
|
|
- FreeMem(OldVideoBuf,MaxVideoBufSize);
|
|
|
|
- videoBufAllocated := false;
|
|
|
|
- end;
|
|
|
|
- VideoBufSize:=0;
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -143,6 +125,7 @@ end;}
|
|
|
|
|
|
procedure SysUpdateScreen(Force: Boolean);
|
|
procedure SysUpdateScreen(Force: Boolean);
|
|
begin
|
|
begin
|
|
|
|
+ if VideoBuf = nil then exit;
|
|
if (LockUpdateScreen<>0) or (VideoBufSize = 0) then
|
|
if (LockUpdateScreen<>0) or (VideoBufSize = 0) then
|
|
exit;
|
|
exit;
|
|
if not force then
|
|
if not force then
|
|
@@ -205,6 +188,7 @@ Const
|
|
initialization
|
|
initialization
|
|
VideoBufAllocated := false;
|
|
VideoBufAllocated := false;
|
|
VideoBufSize := 0;
|
|
VideoBufSize := 0;
|
|
|
|
+ VideoBuf := nil;
|
|
SetVideoDriver (SysVideoDriver);
|
|
SetVideoDriver (SysVideoDriver);
|
|
end.
|
|
end.
|
|
|
|
|