Browse Source

* set _graphresult to grnotdetected if the vesa setmode interrupt
call returns an error (merged from fixes branch)

Jonas Maebe 25 years ago
parent
commit
167eb0e268
1 changed files with 10 additions and 6 deletions
  1. 10 6
      rtl/go32v2/vesa.inc

+ 10 - 6
rtl/go32v2/vesa.inc

@@ -2120,6 +2120,7 @@ Const
 
 
   function setVESAMode(mode:word):boolean;
   function setVESAMode(mode:word):boolean;
     var i:word;
     var i:word;
+        res: boolean;
   begin
   begin
    { Init mode information, for compatibility with VBE < 1.1 }
    { Init mode information, for compatibility with VBE < 1.1 }
    FillChar(VESAModeInfo, sizeof(TVESAModeInfo), #0);
    FillChar(VESAModeInfo, sizeof(TVESAModeInfo), #0);
@@ -2189,10 +2190,11 @@ Const
     sub ax,004Fh
     sub ax,004Fh
     cmp ax,1
     cmp ax,1
     sbb al,al
     sbb al,al
-{$ifndef ver0_99_12}
-    mov @RESULT,al
-{$endif ver0_99_12}
+    mov res,al
    end;
    end;
+   if not res then
+     _GraphResult := GrNotDetected
+   else _GraphResult := grOk;
   end;
   end;
  end;
  end;
 
 
@@ -2403,7 +2405,6 @@ Const
 {$endif fpc}
 {$endif fpc}
       mov  [VideoMode], al
       mov  [VideoMode], al
     end;
     end;
-(*
 {$ifdef logging}
 {$ifdef logging}
         LogLn('Prepare to save VESA video state');
         LogLn('Prepare to save VESA video state');
 {$endif logging}
 {$endif logging}
@@ -2473,7 +2474,6 @@ Const
         regs.ebx := 0;
         regs.ebx := 0;
         RealIntr($10,regs);
         RealIntr($10,regs);
       end;
       end;
-*)
   end;
   end;
 
 
  procedure RestoreStateVESA; {$ifndef fpc}far;{$endif fpc}
  procedure RestoreStateVESA; {$ifndef fpc}far;{$endif fpc}
@@ -2647,7 +2647,11 @@ Const
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2000-07-16 07:08:22  jonas
+  Revision 1.4  2000-08-01 06:03:13  jonas
+    * set _graphresult to grnotdetected if the vesa setmode interrupt
+      call returns an error (merged from fixes branch)
+
+  Revision 1.3  2000/07/16 07:08:22  jonas
     * fixed wrongly matched comment pair for log section
     * fixed wrongly matched comment pair for log section
 
 
   Revision 1.2  2000/07/13 11:33:41  michael
   Revision 1.2  2000/07/13 11:33:41  michael