Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
23
Src/Plugins/Input/in_cdda/util.cpp
Normal file
23
Src/Plugins/Input/in_cdda/util.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "Main.h"
|
||||
|
||||
void WaitForEvent(HANDLE hEvent, DWORD msMaxWaitTime)
|
||||
{
|
||||
// DWORD i;
|
||||
MSG msg;
|
||||
const unsigned long eachWait = 10;
|
||||
unsigned long totalWait = 0;
|
||||
|
||||
while (WaitForSingleObject(hEvent, eachWait) == WAIT_TIMEOUT)
|
||||
{
|
||||
while (PeekMessage(&msg, (HWND) NULL, 0, 0, PM_REMOVE))
|
||||
{
|
||||
//TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
totalWait += eachWait;
|
||||
if (totalWait >= msMaxWaitTime)
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue