mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 17:29:21 +02:00
+ Correct behaviour when initialization fails.
git-svn-id: trunk@3841 -
This commit is contained in:
parent
542bb08ee4
commit
4a3248bc08
@ -149,17 +149,20 @@ end;
|
||||
Procedure InitVideo;
|
||||
|
||||
begin
|
||||
If Not VideoInitialized then
|
||||
if not VideoInitialized then
|
||||
begin
|
||||
If Assigned(CurrentVideoDriver.InitDriver) then
|
||||
if Assigned(CurrentVideoDriver.InitDriver) then
|
||||
CurrentVideoDriver.InitDriver;
|
||||
VideoInitialized:=True;
|
||||
if errorcode=viook then
|
||||
begin
|
||||
VideoInitialized:=true;
|
||||
if NextVideoModeSet then
|
||||
SetVideoMode(NextVideoMode)
|
||||
else
|
||||
AssignVideoBuf(0,0);
|
||||
ClearScreen;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -1098,11 +1098,11 @@ begin
|
||||
{$endif logging}
|
||||
{ save new terminal characteristics and possible restore rawness }
|
||||
videoInitDone;
|
||||
|
||||
decide_codepages;
|
||||
end
|
||||
else
|
||||
ErrorCode:=errVioInit; { not a TTY }
|
||||
|
||||
decide_codepages;
|
||||
end;
|
||||
|
||||
procedure SysDoneVideo;
|
||||
|
Loading…
Reference in New Issue
Block a user