Akihiro Sagawa : mciqtz32: Watch the player thread while waiting a player task.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jun 2 07:50:06 CDT 2015


Module: wine
Branch: master
Commit: 998af35a3e587c8ce4a5f3fb130f9d942df72bda
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=998af35a3e587c8ce4a5f3fb130f9d942df72bda

Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date:   Tue Jun  2 01:22:09 2015 +0900

mciqtz32: Watch the player thread while waiting a player task.

---

 dlls/mciqtz32/mciqtz.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c
index 413c2f6..d018a54 100644
--- a/dlls/mciqtz32/mciqtz.c
+++ b/dlls/mciqtz32/mciqtz.c
@@ -75,6 +75,8 @@ static LRESULT MCIQTZ_relayTaskMessage(DWORD_PTR dwDevID, UINT wMsg,
 {
     WINE_MCIQTZ *wma;
     LRESULT res;
+    HANDLE handles[2];
+    DWORD ret;
     TRACE("(%08lX, %08x, %08x, %08lx)\n", dwDevID, wMsg, dwFlags, lpParms);
 
     wma = MCIQTZ_mciGetOpenDev(dwDevID);
@@ -86,7 +88,11 @@ static LRESULT MCIQTZ_relayTaskMessage(DWORD_PTR dwDevID, UINT wMsg,
     wma->task.flags = dwFlags;
     wma->task.parms = lpParms;
     SetEvent(wma->task.notify);
-    if (WaitForSingleObject(wma->task.done, INFINITE) == WAIT_OBJECT_0)
+    handles[0] = wma->task.done;
+    handles[1] = wma->task.thread;
+    ret = WaitForMultipleObjects(sizeof(handles)/sizeof(handles[0]), handles,
+                                 FALSE, INFINITE);
+    if (ret == WAIT_OBJECT_0)
         res = wma->task.res;
     else
         res = MCIERR_INTERNAL;




More information about the wine-cvs mailing list