|
@@ -239,6 +239,13 @@ end;
|
|
{$endif fpc}
|
|
{$endif fpc}
|
|
{ get the segment value }
|
|
{ get the segment value }
|
|
RealSeg := word(Ptr shr 16);
|
|
RealSeg := word(Ptr shr 16);
|
|
|
|
+ { we have to init everything to zero, since VBE < 1.1 }
|
|
|
|
+ { may not setup fields correctly. }
|
|
|
|
+{$ifndef fpc}
|
|
|
|
+ FillChar(VESAPtr^, sizeof(ModeInfo), #0);
|
|
|
|
+{$else fpc}
|
|
|
|
+ DosMemFillChar(RealSeg, 0, sizeof(ModeInfo), #0);
|
|
|
|
+{$endif fpc}
|
|
{ setup interrupt registers }
|
|
{ setup interrupt registers }
|
|
FillChar(regs, sizeof(regs), #0);
|
|
FillChar(regs, sizeof(regs), #0);
|
|
{ call VESA mode information...}
|
|
{ call VESA mode information...}
|
|
@@ -327,7 +334,10 @@ end;
|
|
begin
|
|
begin
|
|
{ we have to init everything to zero, since VBE < 1.1 }
|
|
{ we have to init everything to zero, since VBE < 1.1 }
|
|
{ may not setup fields correctly. }
|
|
{ may not setup fields correctly. }
|
|
|
|
+ { bugfix: for DPMI this is now done in GetVESAModeInfo }
|
|
|
|
+{$IFNDEF DPMI}
|
|
FillChar(VESAModeInfo, sizeof(VESAModeInfo), #0);
|
|
FillChar(VESAModeInfo, sizeof(VESAModeInfo), #0);
|
|
|
|
+{$ENDIF}
|
|
If GetVESAModeInfo(VESAModeInfo, Mode) And
|
|
If GetVESAModeInfo(VESAModeInfo, Mode) And
|
|
((VESAModeInfo.attr and modeAvail) <> 0) then
|
|
((VESAModeInfo.attr and modeAvail) <> 0) then
|
|
ModeSupported := TRUE
|
|
ModeSupported := TRUE
|