PATCH : VGA_ioport_in and vertical refresh (resubmitting with patch)

Christian COSTA titan.costa at wanadoo.fr
Wed Apr 17 13:58:36 CDT 2002


Changelog :
        dlls/winedos/vga.c : VGA_ioport_in
        Fake the occurence of the vertical refresh when no graphic mode
        has been set

Christian COSTA   titan.costa at wanadoo.fr
-------------- next part --------------
Index: vga.c
===================================================================
RCS file: /home/wine/wine/dlls/winedos/vga.c,v
retrieving revision 1.8
diff -u -r1.8 vga.c
--- vga.c	11 Apr 2002 17:33:15 -0000	1.8
+++ vga.c	16 Apr 2002 19:12:02 -0000
@@ -43,6 +43,8 @@
 static int vga_depth;
 static BYTE vga_text_attr;
 
+static BOOL vga_mode_initialized = FALSE;
+
 static CRITICAL_SECTION vga_lock = CRITICAL_SECTION_INIT("VGA");
 
 typedef HRESULT (WINAPI *DirectDrawCreateProc)(LPGUID,LPDIRECTDRAW *,LPUNKNOWN);
@@ -316,6 +318,8 @@
 
     par.Depth = (Depth < 8) ? 8 : Depth;
 
+    vga_mode_initialized = TRUE;
+
     MZ_RunInThread(VGA_DoSetMode, (ULONG_PTR)&par);
     return par.ret;
 }
@@ -734,7 +738,12 @@
             /* since we don't (yet?) serve DOS VM requests while VGA_Poll is running,
                we need to fake the occurrence of the vertical refresh */
             ret=vga_refresh?0x00:0x08;
-            vga_refresh=0;
+            if (vga_mode_initialized)
+                vga_refresh=0;
+            else
+                /* Also fake the occurence of the vertical refresh when no graphic
+                   mode has been set */
+                vga_refresh=!vga_refresh;
             break;
         default:
             ret=0xff;


More information about the wine-patches mailing list