From 8558eff8aa1365bdd89fca002965ded9c80e9de8 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Fri, 26 May 2017 01:22:11 +0200 Subject: properly reset 3D thread state --- src/wx/Platform.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/wx') diff --git a/src/wx/Platform.cpp b/src/wx/Platform.cpp index 1fb4373..b925e24 100644 --- a/src/wx/Platform.cpp +++ b/src/wx/Platform.cpp @@ -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(); -- cgit v1.2.3