From 0e9dcf74b2bb4392a653013462baa9b5f1ef1575 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 15 Apr 2022 23:07:54 +1000 Subject: [PATCH] Common/Semaphore: Fix WaitWithYield() returning immediately This caused the WaitGS() issued from the main thread when applying renderer settings (while the core thread was paused) to return immediately, and a massive race resuming. --- common/Semaphore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Semaphore.cpp b/common/Semaphore.cpp index 42b3247843..99453ad201 100644 --- a/common/Semaphore.cpp +++ b/common/Semaphore.cpp @@ -167,7 +167,7 @@ void Threading::KernelSemaphore::WaitWithYield() { #ifdef _WIN32 u64 millis = def_yieldgui_interval.GetMilliseconds().GetValue(); - while (pthreadCancelableTimedWait(m_sema, millis) == WAIT_TIMEOUT) + while (pthreadCancelableTimedWait(m_sema, millis) == ETIMEDOUT) YieldToMain(); #else while (true)