mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-22 22:51:40 +02:00
* fixed problem that occurred if the graphmode was initialized with
a new graphdriver, but then setgraphmode was called with as parameter the result of getGraphMode (since that one returns an old-style modenumber)
This commit is contained in:
parent
ab6fd6b3b8
commit
732f06de57
@ -181,7 +181,10 @@ end;
|
|||||||
begin
|
begin
|
||||||
list := ModeList;
|
list := ModeList;
|
||||||
{ go to the end of the list }
|
{ go to the end of the list }
|
||||||
while assigned(list^.next) do
|
while assigned(list^.next) and
|
||||||
|
((list^.drivernumber < mode.drivernumber) or
|
||||||
|
((list^.drivernumber = mode.drivernumber) and
|
||||||
|
(list^.modenumber < mode.modenumber))) do
|
||||||
list:=list^.next;
|
list:=list^.next;
|
||||||
new(NewLst);
|
new(NewLst);
|
||||||
list^.next := NewLst;
|
list^.next := NewLst;
|
||||||
@ -417,7 +420,22 @@ end;
|
|||||||
modeinfo: PModeInfo;
|
modeinfo: PModeInfo;
|
||||||
begin
|
begin
|
||||||
{ check if the mode exists... }
|
{ check if the mode exists... }
|
||||||
modeinfo := searchmode(IntcurrentNewDriver,mode);
|
{ Depending on the modenumber, we search using the old or new }
|
||||||
|
{ graphdriver number (because once we entered graphmode, }
|
||||||
|
{ getgraphmode() returns the old mode number and }
|
||||||
|
{ both setgraphmode(getgraphmode) and setgraphmode(mAAAxBBB) }
|
||||||
|
{ have to work (JM) }
|
||||||
|
case mode of
|
||||||
|
detectMode:
|
||||||
|
begin
|
||||||
|
mode := -32767;
|
||||||
|
modeInfo := searchmode(IntcurrentNewDriver,mode);
|
||||||
|
end;
|
||||||
|
lowNewMode..highNewMode:
|
||||||
|
modeInfo := searchmode(IntcurrentNewDriver,mode);
|
||||||
|
else
|
||||||
|
modeinfo := searchmode(IntcurrentDriver,mode);
|
||||||
|
end;
|
||||||
if not assigned(modeinfo) then
|
if not assigned(modeinfo) then
|
||||||
begin
|
begin
|
||||||
{$ifdef logging}
|
{$ifdef logging}
|
||||||
@ -573,7 +591,13 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.31 2000-07-07 17:29:30 jonas
|
Revision 1.32 2000-07-08 06:24:21 jonas
|
||||||
|
* fixed problem that occurred if the graphmode was initialized with
|
||||||
|
a new graphdriver, but then setgraphmode was called with as
|
||||||
|
parameter the result of getGraphMode (since that one returns an
|
||||||
|
old-style modenumber)
|
||||||
|
|
||||||
|
Revision 1.31 2000/07/07 17:29:30 jonas
|
||||||
* fixed setgraphmode together with the new graphdrivers
|
* fixed setgraphmode together with the new graphdrivers
|
||||||
|
|
||||||
Revision 1.30 2000/07/05 13:07:48 jonas
|
Revision 1.30 2000/07/05 13:07:48 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user