[DDraw] 'Fix' GetVerticalBlankStatus

Lionel Ulmer lionel.ulmer at free.fr
Sun Jan 15 06:55:18 CST 2006


Hi all,

Some games seem to wait for the 'GetVerticalBlankStatus' to return FALSE
(after having returned TRUE) to start drawing on screen... As Wine's
implementation always returned TRUE (i.e. meaning that the VBlank is
occuring), these games were blocked.

This fixes bug 4306.

Changelog:
  Better simulate what 'GetVerticalBlankStatus' does on real hardware

             Lionel

-- 
		 Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: dlls/ddraw/ddraw_main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw_main.c,v
retrieving revision 1.12
diff -u -r1.12 ddraw_main.c
--- dlls/ddraw/ddraw_main.c	10 Nov 2005 12:14:59 -0000	1.12
+++ dlls/ddraw/ddraw_main.c	15 Jan 2006 12:51:56 -0000
@@ -1067,7 +1067,8 @@
 {
     IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
     TRACE("(%p)->(%p)\n",This,status);
-    *status = TRUE;
+    *status = This->fake_vblank;
+    This->fake_vblank = !This->fake_vblank;
     return DD_OK;
 }
 
Index: dlls/ddraw/ddraw_private.h
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw_private.h,v
retrieving revision 1.51
diff -u -r1.51 ddraw_private.h
--- dlls/ddraw/ddraw_private.h	10 Oct 2005 19:53:37 -0000	1.51
+++ dlls/ddraw/ddraw_private.h	15 Jan 2006 12:51:56 -0000
@@ -114,6 +114,8 @@
     DDPIXELFORMAT pixelformat;
     DWORD cur_scanline;
 
+    BOOL fake_vblank;
+    
     /* Should each of these go into some structure? */
     DWORD orig_width, orig_height;
     LONG orig_pitch;


More information about the wine-patches mailing list