فهرست منبع

* 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!

carl 26 سال پیش
والد
کامیت
1bca153f22
1فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 6 4
      rtl/inc/graph/vesa.inc

+ 6 - 4
rtl/inc/graph/vesa.inc

@@ -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;