mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 03:30:15 +02: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;
|
||||
RealIntr($10, regs);
|
||||
if VESAPtr^.Signature <> 'VESA' then
|
||||
getVesaInfo := FALSE
|
||||
begin
|
||||
getVesaInfo := FALSE;
|
||||
GlobalDosFree(word(longint(VESAPtr) shr 16));
|
||||
exit;
|
||||
end
|
||||
else
|
||||
getVesaInfo := TRUE;
|
||||
{ The mode pointer buffer points to a real mode memory }
|
||||
@ -232,8 +236,7 @@ end;
|
||||
end;
|
||||
|
||||
{$ELSE}
|
||||
function getVESAInfo(var VESAInfo: TVESAInfo) : boolean;
|
||||
begin
|
||||
function getVESAInfo(var VESAInfo: TVESAInfo) : boolean; assembler;
|
||||
asm
|
||||
mov ax,4F00h
|
||||
les di,VESAInfo
|
||||
@ -248,7 +251,6 @@ end;
|
||||
@@ERR:
|
||||
mov al,0
|
||||
@@X:
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user