[Wine]Snood patch for Wine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,

I have a small patch to Wine-20040716 that allows the game Snood to run
correctly.  This is intended for Snood addicts, not for incorporation
into the main winehq CVS.  Andreas Mohr's observations about the message
ordering problem that comes up in Snood are in the following URLs:
http://www.mail-archive.com/wine-devel@xxxxxxxxxx/msg03049.html
http://bugs.winehq.org/show_bug.cgi?id=168
This patch just ensures that the 0x5555 posted message is always handled
after hardware messages.

To use it, download the Wine sources (Wine-20040716.tar.gz) from
www.winehq.org, and unpack the sources:

tar xvfz Wine-2040716.tar.gz

Assuming that the patch file wine-20040716-snood-hack.diff is in the
current directory, it can be applied as follows:

patch -p1 -d wine-20040716 -i wine-20040716-snood-hack.diff

Now build Wine from the sources as usual.  It should also work for other
versions of Wine.



diff -urN wine-20040716/server/queue.c wine-20040716-snood-hack/server/queue.c
--- wine-20040716/server/queue.c        2004-06-17 13:00:25.000000000 -0700
+++ wine-20040716-snood-hack/server/queue.c     2004-08-14 12:56:00.011896672 -0700
@@ -1456,13 +1456,27 @@
     queue->changed_bits = 0;

     /* then check for posted messages */
-    if (get_posted_message( queue, get_win, req->get_first, req->get_last, req->flags, reply ))
+    /* but NOT any with code 0x5555 - hack to make Snood work! */
+    if ((req->get_first <= 0x5555) && (0x5555 <= req->get_last))
+    {
+        if (get_posted_message( queue, get_win, req->get_first, 0x5554, req->flags, reply ))
+            return;
+        if (get_posted_message( queue, get_win, 0x5556, req->get_last, req->flags, reply ))
+            return;
+    }
+    else if (get_posted_message( queue, get_win, req->get_first, req->get_last, req->flags, reply ))
         return;
-
+
     /* then check for any raw hardware message */
     if (get_hardware_message( current, first_hw_msg, get_win, reply ))
         return;

+    /* Now check for posted messages with code 0x5555 - hack to make Snood work! */
+
+    if ((req->get_first <= 0x5555) && (0x5555 <= req->get_last)
+        && (get_posted_message( queue, get_win, 0x5555, 0x5555, req->flags, reply )))
+       return;
+
     /* now check for WM_PAINT */
     if (queue->paint_count &&
         (WM_PAINT >= req->get_first) && (WM_PAINT <= req->get_last) &&
_______________________________________________
wine-users mailing list
wine-users@xxxxxxxxxx
http://www.winehq.org/mailman/listinfo/wine-users

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux