[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690

Alexandre Julliard julliard at winehq.org
Sun Jun 17 20:03:02 UTC 2012


The following commit has been merged in the wheezy branch:
commit e4038bceafa84c7371b68d64a76a07958f28244a
Author: Piotr Caban <piotr at codeweavers.com>
Date:   Fri Apr 6 14:49:54 2012 +0200

    ddraw: Improve GetScanLine stub so it's usable for timing related tasks.
    (cherry picked from commit 5c85f96f33b71b8e8991d6ecbbafac9b1306cb4a)

diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 25519d2..d1b1448 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -1964,8 +1964,8 @@ static HRESULT WINAPI ddraw7_GetScanLine(IDirectDraw7 *iface, DWORD *Scanline)
 {
     IDirectDrawImpl *This = impl_from_IDirectDraw7(iface);
     struct wined3d_display_mode mode;
-    static DWORD cur_scanline;
     static BOOL hide = FALSE;
+    DWORD time, frame_progress, lines;
 
     TRACE("iface %p, line %p.\n", iface, Scanline);
 
@@ -1982,11 +1982,20 @@ static HRESULT WINAPI ddraw7_GetScanLine(IDirectDraw7 *iface, DWORD *Scanline)
 
     /* Fake the line sweeping of the monitor */
     /* FIXME: We should synchronize with a source to keep the refresh rate */
-    *Scanline = cur_scanline++;
-    /* Assume 20 scan lines in the vertical blank */
-    if (cur_scanline >= mode.height + 20)
-        cur_scanline = 0;
 
+    /* Simulate a 60Hz display */
+    time = GetTickCount();
+    frame_progress = time & 15; /* time % (1000 / 60) */
+    if (!frame_progress)
+    {
+        *Scanline = 0;
+        return DDERR_VERTICALBLANKINPROGRESS;
+    }
+
+    /* Convert frame_progress to estimated scan line. Return any line from
+     * block determined by time. Some lines may be never returned */
+    lines = mode.height / 15;
+    *Scanline = (frame_progress - 1) * lines + time % lines;
     return DD_OK;
 }
 

-- 
Debian Wine packaging



More information about the pkg-wine-party mailing list