mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 08:08:20 +00:00
mciqtz32: Watch the player thread while waiting a player task.
This commit is contained in:
parent
d2e9856a56
commit
998af35a3e
|
@ -75,6 +75,8 @@ static LRESULT MCIQTZ_relayTaskMessage(DWORD_PTR dwDevID, UINT wMsg,
|
||||||
{
|
{
|
||||||
WINE_MCIQTZ *wma;
|
WINE_MCIQTZ *wma;
|
||||||
LRESULT res;
|
LRESULT res;
|
||||||
|
HANDLE handles[2];
|
||||||
|
DWORD ret;
|
||||||
TRACE("(%08lX, %08x, %08x, %08lx)\n", dwDevID, wMsg, dwFlags, lpParms);
|
TRACE("(%08lX, %08x, %08x, %08lx)\n", dwDevID, wMsg, dwFlags, lpParms);
|
||||||
|
|
||||||
wma = MCIQTZ_mciGetOpenDev(dwDevID);
|
wma = MCIQTZ_mciGetOpenDev(dwDevID);
|
||||||
|
@ -86,7 +88,11 @@ static LRESULT MCIQTZ_relayTaskMessage(DWORD_PTR dwDevID, UINT wMsg,
|
||||||
wma->task.flags = dwFlags;
|
wma->task.flags = dwFlags;
|
||||||
wma->task.parms = lpParms;
|
wma->task.parms = lpParms;
|
||||||
SetEvent(wma->task.notify);
|
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;
|
res = wma->task.res;
|
||||||
else
|
else
|
||||||
res = MCIERR_INTERNAL;
|
res = MCIERR_INTERNAL;
|
||||||
|
|
Loading…
Reference in a new issue