mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[User32]
- Return timeout if the count and wait time is zero. This is a wine hack and fixes two related mgs:test_MsgWait* tests. Attempt to fix CORE-9117. Not sure if MsgWaitForMultipleObjects is the problem. svn path=/trunk/; revision=66175
This commit is contained in:
parent
d511783a3c
commit
4f897d6aa9
|
@ -3107,7 +3107,7 @@ RealMsgWaitForMultipleObjectsEx(
|
|||
if ( (pcti->fsChangeBits & LOWORD(dwWakeMask)) ||
|
||||
( (dwFlags & MWMO_INPUTAVAILABLE) && (pcti->fsWakeBits & LOWORD(dwWakeMask)) ) )
|
||||
{
|
||||
//FIXME("Chg 0x%x Wake 0x%x Mask 0x%x nCnt %d\n",pcti->fsChangeBits, pcti->fsWakeBits, dwWakeMask, nCount);
|
||||
//FIXME("Return Chg 0x%x Wake 0x%x Mask 0x%x nCnt %d\n",pcti->fsChangeBits, pcti->fsWakeBits, dwWakeMask, nCount);
|
||||
return nCount;
|
||||
}
|
||||
}
|
||||
|
@ -3130,12 +3130,22 @@ RealMsgWaitForMultipleObjectsEx(
|
|||
RtlCopyMemory(RealHandles, pHandles, nCount * sizeof(HANDLE));
|
||||
RealHandles[nCount] = MessageQueueHandle;
|
||||
|
||||
Result = WaitForMultipleObjectsEx(nCount + 1, RealHandles,
|
||||
dwFlags & MWMO_WAITALL,
|
||||
dwMilliseconds, dwFlags & MWMO_ALERTABLE);
|
||||
//FIXME("1 Chg 0x%x Wake 0x%x Mask 0x%x nCnt %d\n",pcti->fsChangeBits, pcti->fsWakeBits, dwWakeMask, nCount);
|
||||
|
||||
Result = WaitForMultipleObjectsEx( nCount + 1,
|
||||
RealHandles,
|
||||
dwFlags & MWMO_WAITALL,
|
||||
dwMilliseconds,
|
||||
dwFlags & MWMO_ALERTABLE );
|
||||
|
||||
//FIXME("2 Chg 0x%x Wake 0x%x Mask 0x%x nCnt %d\n",pcti->fsChangeBits, pcti->fsWakeBits, dwWakeMask, nCount);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, RealHandles);
|
||||
NtUserxMsqClearWakeMask();
|
||||
|
||||
// wine hack! MSDN: If dwMilliseconds is zero,,specified objects are not signaled; it always returns immediately.
|
||||
if (!Result && !nCount && !dwMilliseconds) Result = WAIT_TIMEOUT;
|
||||
|
||||
//FIXME("Result 0X%x\n",Result);
|
||||
return Result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue