Commit 7b738b7f authored by Alexandre Julliard's avatar Alexandre Julliard

Make sure to always pass valid QS_* flags to

MsgWaitForMultipleObjects.
parent c02dd0a9
...@@ -397,7 +397,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState( ...@@ -397,7 +397,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
if (len != 256) if (len != 256)
return DIERR_INVALIDPARAM; return DIERR_INVALIDPARAM;
MsgWaitForMultipleObjectsEx(0, NULL, 0, 0, 0); MsgWaitForMultipleObjectsEx(0, NULL, 0, QS_ALLINPUT, 0);
if (TRACE_ON(dinput)) { if (TRACE_ON(dinput)) {
int i; int i;
...@@ -432,7 +432,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData( ...@@ -432,7 +432,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
if (dodsize < sizeof(DIDEVICEOBJECTDATA_DX3)) if (dodsize < sizeof(DIDEVICEOBJECTDATA_DX3))
return DIERR_INVALIDPARAM; return DIERR_INVALIDPARAM;
MsgWaitForMultipleObjectsEx(0, NULL, 0, 0, 0); MsgWaitForMultipleObjectsEx(0, NULL, 0, QS_ALLINPUT, 0);
EnterCriticalSection(&(This->crit)); EnterCriticalSection(&(This->crit));
......
...@@ -1777,7 +1777,7 @@ static void wait_message_reply( UINT flags ) ...@@ -1777,7 +1777,7 @@ static void wait_message_reply( UINT flags )
if (USER_Driver.pMsgWaitForMultipleObjectsEx) if (USER_Driver.pMsgWaitForMultipleObjectsEx)
res = USER_Driver.pMsgWaitForMultipleObjectsEx( 1, &queue->server_queue, res = USER_Driver.pMsgWaitForMultipleObjectsEx( 1, &queue->server_queue,
INFINITE, 0, 0 ); INFINITE, QS_ALLINPUT, 0 );
else else
res = WaitForSingleObject( queue->server_queue, INFINITE ); res = WaitForSingleObject( queue->server_queue, INFINITE );
...@@ -2338,7 +2338,7 @@ BOOL WINAPI PeekMessageW( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT f ...@@ -2338,7 +2338,7 @@ BOOL WINAPI PeekMessageW( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT f
/* check for graphics events */ /* check for graphics events */
if (USER_Driver.pMsgWaitForMultipleObjectsEx) if (USER_Driver.pMsgWaitForMultipleObjectsEx)
USER_Driver.pMsgWaitForMultipleObjectsEx( 0, NULL, 0, 0, 0 ); USER_Driver.pMsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_ALLINPUT, 0 );
hwnd = WIN_GetFullHandle( hwnd ); hwnd = WIN_GetFullHandle( hwnd );
locks = WIN_SuspendWndsLock(); locks = WIN_SuspendWndsLock();
...@@ -2444,7 +2444,8 @@ BOOL WINAPI GetMessageW( MSG *msg, HWND hwnd, UINT first, UINT last ) ...@@ -2444,7 +2444,8 @@ BOOL WINAPI GetMessageW( MSG *msg, HWND hwnd, UINT first, UINT last )
ReleaseThunkLock( &dwlc ); ReleaseThunkLock( &dwlc );
if (USER_Driver.pMsgWaitForMultipleObjectsEx) if (USER_Driver.pMsgWaitForMultipleObjectsEx)
USER_Driver.pMsgWaitForMultipleObjectsEx( 1, &queue->server_queue, INFINITE, 0, 0 ); USER_Driver.pMsgWaitForMultipleObjectsEx( 1, &queue->server_queue, INFINITE,
QS_ALLINPUT, 0 );
else else
WaitForSingleObject( queue->server_queue, INFINITE ); WaitForSingleObject( queue->server_queue, INFINITE );
if (dwlc) RestoreThunkLock( dwlc ); if (dwlc) RestoreThunkLock( dwlc );
......
...@@ -514,8 +514,8 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms ...@@ -514,8 +514,8 @@ 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 = MsgWaitForMultipleObjects(2, events, FALSE, ret = MsgWaitForMultipleObjectsEx(2, events,
(delta >= frameTime) ? 0 : frameTime - delta, MWMO_INPUTAVAILABLE); (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;
...@@ -527,7 +527,8 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms ...@@ -527,7 +527,8 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
DWORD ret; DWORD ret;
LeaveCriticalSection(&wma->cs); LeaveCriticalSection(&wma->cs);
ret = MsgWaitForMultipleObjects(1, &wma->hStopEvent, FALSE, frameTime - delta, MWMO_INPUTAVAILABLE); ret = MsgWaitForMultipleObjectsEx(1, &wma->hStopEvent, frameTime - delta,
QS_ALLINPUT, MWMO_INPUTAVAILABLE);
EnterCriticalSection(&wma->cs); EnterCriticalSection(&wma->cs);
if (ret == WAIT_OBJECT_0) break; if (ret == WAIT_OBJECT_0) break;
} }
......
...@@ -146,7 +146,7 @@ DWORD WINAPI GetQueueStatus( UINT flags ) ...@@ -146,7 +146,7 @@ DWORD WINAPI GetQueueStatus( UINT flags )
/* check for pending X events */ /* check for pending X events */
if (USER_Driver.pMsgWaitForMultipleObjectsEx) if (USER_Driver.pMsgWaitForMultipleObjectsEx)
USER_Driver.pMsgWaitForMultipleObjectsEx( 0, NULL, 0, 0, 0 ); USER_Driver.pMsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_ALLINPUT, 0 );
SERVER_START_REQ( get_queue_status ) SERVER_START_REQ( get_queue_status )
{ {
...@@ -168,7 +168,7 @@ BOOL WINAPI GetInputState(void) ...@@ -168,7 +168,7 @@ BOOL WINAPI GetInputState(void)
/* check for pending X events */ /* check for pending X events */
if (USER_Driver.pMsgWaitForMultipleObjectsEx) if (USER_Driver.pMsgWaitForMultipleObjectsEx)
USER_Driver.pMsgWaitForMultipleObjectsEx( 0, NULL, 0, 0, 0 ); USER_Driver.pMsgWaitForMultipleObjectsEx( 0, NULL, 0, QS_INPUT, 0 );
SERVER_START_REQ( get_queue_status ) SERVER_START_REQ( get_queue_status )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment