GetMessage related Jagged Alliance 2 regression

Alexandre Julliard julliard at winehq.org
Thu Dec 6 13:19:03 CST 2007


Alexander Dorofeyev <alexd4 at inbox.lv> writes:

> I'm not sure what would be a proper fix, although I did find out that commenting 
> out this line in peek_message()
>
> if (HIWORD(flags)) flags = PM_QS_SENDMESSAGE | LOWORD(flags);
>
> makes the game playable. Maybe this clearing of PM_QS_* flags shouldn't be done 
> in case when the message gets dropped? Before that commit nothing was passed in 
> flags high word, which is probably why this problem wasn't happening.

Does this help?

diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 53d1c1d..d3f4a3a 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -2173,11 +2173,11 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
                                    WMCHAR_MAP_RECVMESSAGE );
         reply_message( &info, result, TRUE );
         thread_info->receive_info = old_info;
-    next:
-        HeapFree( GetProcessHeap(), 0, buffer );
 
         /* if some PM_QS* flags were specified, only handle sent messages from now on */
         if (HIWORD(flags)) flags = PM_QS_SENDMESSAGE | LOWORD(flags);
+    next:
+        HeapFree( GetProcessHeap(), 0, buffer );
     }
 }
 

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list