windows: Use WaitForSingleObjectEx() always
This is available since Windows XP, so it's safe to use always, not just in a WinRT ifdef.
parent
77bb49b7a7
commit
140cc46004
|
@ -90,11 +90,7 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout)
|
||||||
} else {
|
} else {
|
||||||
dwMilliseconds = (DWORD) timeout;
|
dwMilliseconds = (DWORD) timeout;
|
||||||
}
|
}
|
||||||
#if __WINRT__
|
|
||||||
switch (WaitForSingleObjectEx(sem->id, dwMilliseconds, FALSE)) {
|
switch (WaitForSingleObjectEx(sem->id, dwMilliseconds, FALSE)) {
|
||||||
#else
|
|
||||||
switch (WaitForSingleObject(sem->id, dwMilliseconds)) {
|
|
||||||
#endif
|
|
||||||
case WAIT_OBJECT_0:
|
case WAIT_OBJECT_0:
|
||||||
InterlockedDecrement(&sem->count);
|
InterlockedDecrement(&sem->count);
|
||||||
retval = 0;
|
retval = 0;
|
||||||
|
|
Loading…
Reference in New Issue