summaryrefslogtreecommitdiff
path: root/packages/graph
diff options
context:
space:
mode:
authornickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-08-13 00:08:49 +0000
committernickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2010-08-13 00:08:49 +0000
commita294a40f5c7f88692dbfb9f54847d9a66005bb62 (patch)
treed123170d3ffe2f92053a4d9d26ef2e9aaa968784 /packages/graph
parentb52ae09f82bb066e1d90f14a6f90035cbb033027 (diff)
downloadfpc-a294a40f5c7f88692dbfb9f54847d9a66005bb62.tar.gz
VESA 1.0 fix - zero fill the real mode ModeInfo struct, not the protected mode struct
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@15791 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/graph')
-rw-r--r--packages/graph/src/go32v2/vesa.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/graph/src/go32v2/vesa.inc b/packages/graph/src/go32v2/vesa.inc
index bbe38a37fe..4906f0bff0 100644
--- a/packages/graph/src/go32v2/vesa.inc
+++ b/packages/graph/src/go32v2/vesa.inc
@@ -239,6 +239,13 @@ end;
{$endif fpc}
{ get the segment value }
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 }
FillChar(regs, sizeof(regs), #0);
{ call VESA mode information...}
@@ -327,7 +334,10 @@ end;
begin
{ we have to init everything to zero, since VBE < 1.1 }
{ may not setup fields correctly. }
+ { bugfix: for DPMI this is now done in GetVESAModeInfo }
+{$IFNDEF DPMI}
FillChar(VESAModeInfo, sizeof(VESAModeInfo), #0);
+{$ENDIF}
If GetVESAModeInfo(VESAModeInfo, Mode) And
((VESAModeInfo.attr and modeAvail) <> 0) then
ModeSupported := TRUE