* fixed setgraphmode together with the new graphdrivers

This commit is contained in:
Jonas Maebe 2000-07-07 17:29:30 +00:00
parent 1104d83363
commit 575f6c0d6d
2 changed files with 15 additions and 5 deletions

View File

@ -115,6 +115,7 @@ var
{ Should be set in InitGraph once only. }
IntCurrentMode : smallint;
IntCurrentDriver : smallint; { Currently loaded driver }
IntCurrentNewDriver: smallint;
XAspect : word;
YAspect : word;
MaxX : smallint; { Maximum resolution - ABSOLUTE }
@ -1476,6 +1477,7 @@ end;
{ Reset to default values }
IntCurrentMode := 0;
IntCurrentDriver := 0;
IntCurrentNewDriver := 0;
XAspect := 0;
YAspect := 0;
MaxX := 0;
@ -2292,6 +2294,7 @@ end;
{ _GraphResult is now already set to grOK by DetectGraph }
IntCurrentDriver := GraphDriver;
IntCurrentNewDriver := GraphDriver;
SaveVideoState;
{ Actually set the graph mode...}
SetGraphMode(GraphMode);
@ -2308,6 +2311,7 @@ end;
begin
_GraphResult := grOK;
IntCurrentDriver := GraphDriver;
IntCurrentNewDriver := GraphDriver;
SaveVideoState;
{$ifdef logging}
If _GraphResult <> grOK then
@ -2430,7 +2434,10 @@ begin
end;
{
$Log$
Revision 1.38 2000-06-27 13:37:04 jonas
Revision 1.39 2000-07-07 17:29:30 jonas
* fixed setgraphmode together with the new graphdrivers
Revision 1.38 2000/06/27 13:37:04 jonas
* released -dnewmodes
Revision 1.37 2000/06/23 19:56:37 jonas

View File

@ -340,7 +340,7 @@ end;
mode:=nil;
GetModeName:='';
{ only search in the current driver modes ... }
mode:=SearchMode(IntCurrentDriver,ModeNumber);
mode:=SearchMode(IntCurrentNewDriver,ModeNumber);
if assigned(mode) then
GetModeName:=Mode^.ModeName
else
@ -367,7 +367,7 @@ end;
inc(i);
{ mode 0 always exists... }
{ start search at 1.. }
mode:=SearchMode(IntCurrentDriver,i);
mode:=SearchMode(IntCurrentNewDriver,i);
until not assigned(mode);
GetMaxMode:=i;
end;
@ -417,7 +417,7 @@ end;
modeinfo: PModeInfo;
begin
{ check if the mode exists... }
modeinfo := searchmode(IntcurrentDriver,mode);
modeinfo := searchmode(IntcurrentNewDriver,mode);
if not assigned(modeinfo) then
begin
{$ifdef logging}
@ -573,7 +573,10 @@ end;
{
$Log$
Revision 1.30 2000-07-05 13:07:48 jonas
Revision 1.31 2000-07-07 17:29:30 jonas
* fixed setgraphmode together with the new graphdrivers
Revision 1.30 2000/07/05 13:07:48 jonas
* final fixes for linux support (graphdriver value of the modes
is now also not modified anymore)