properly reset 3D thread state

This commit is contained in:
StapleButter
2017-05-26 01:22:11 +02:00
parent 9d2b36127d
commit 8558eff8aa
3 changed files with 30 additions and 12 deletions

View File

@ -109,6 +109,11 @@ void Semaphore_Free(void* sema)
delete (wxSemaphore*)sema;
}
void Semaphore_Reset(void* sema)
{
while (((wxSemaphore*)sema)->TryWait() == wxSEMA_NO_ERROR);
}
void Semaphore_Wait(void* sema)
{
((wxSemaphore*)sema)->Wait();