mciavi: Don't wait for events we don't handle.

This commit is contained in:
Christian Costa 2009-01-19 12:26:23 +01:00 committed by Alexandre Julliard
parent d2a383b658
commit c51ef12b17
1 changed files with 2 additions and 4 deletions

View File

@ -506,8 +506,7 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
delta = GetTickCount() - tc; delta = GetTickCount() - tc;
LeaveCriticalSection(&wma->cs); LeaveCriticalSection(&wma->cs);
ret = MsgWaitForMultipleObjectsEx(2, events, ret = WaitForMultipleObjects(2, events, FALSE, (delta >= frameTime) ? 0 : frameTime - delta);
(delta >= frameTime) ? 0 : frameTime - delta, QS_ALLINPUT, MWMO_INPUTAVAILABLE);
EnterCriticalSection(&wma->cs); EnterCriticalSection(&wma->cs);
if (ret == WAIT_OBJECT_0 || wma->dwStatus != MCI_MODE_PLAY) break; if (ret == WAIT_OBJECT_0 || wma->dwStatus != MCI_MODE_PLAY) break;
@ -520,8 +519,7 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
delta = 0; delta = 0;
LeaveCriticalSection(&wma->cs); LeaveCriticalSection(&wma->cs);
ret = MsgWaitForMultipleObjectsEx(1, &wma->hStopEvent, delta, ret = WaitForMultipleObjects(1, &wma->hStopEvent, FALSE, delta);
QS_ALLINPUT, MWMO_INPUTAVAILABLE);
EnterCriticalSection(&wma->cs); EnterCriticalSection(&wma->cs);
if (ret == WAIT_OBJECT_0) break; if (ret == WAIT_OBJECT_0) break;