mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-04 19:09:22 +01:00
* getVESAInfo (real mode) would always return TRUE, this would crash
windowed VESA modes.
* getVESAInfo (protected mode) would still continue on with
setting up the VESA structure, even if VESA was not
detected!
This commit is contained in:
parent
926094a703
commit
1bca153f22
@ -162,7 +162,11 @@ end;
|
|||||||
regs.edi := $00;
|
regs.edi := $00;
|
||||||
RealIntr($10, regs);
|
RealIntr($10, regs);
|
||||||
if VESAPtr^.Signature <> 'VESA' then
|
if VESAPtr^.Signature <> 'VESA' then
|
||||||
getVesaInfo := FALSE
|
begin
|
||||||
|
getVesaInfo := FALSE;
|
||||||
|
GlobalDosFree(word(longint(VESAPtr) shr 16));
|
||||||
|
exit;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
getVesaInfo := TRUE;
|
getVesaInfo := TRUE;
|
||||||
{ The mode pointer buffer points to a real mode memory }
|
{ The mode pointer buffer points to a real mode memory }
|
||||||
@ -232,8 +236,7 @@ end;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
function getVESAInfo(var VESAInfo: TVESAInfo) : boolean;
|
function getVESAInfo(var VESAInfo: TVESAInfo) : boolean; assembler;
|
||||||
begin
|
|
||||||
asm
|
asm
|
||||||
mov ax,4F00h
|
mov ax,4F00h
|
||||||
les di,VESAInfo
|
les di,VESAInfo
|
||||||
@ -248,7 +251,6 @@ end;
|
|||||||
@@ERR:
|
@@ERR:
|
||||||
mov al,0
|
mov al,0
|
||||||
@@X:
|
@@X:
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user