diff --git a/core/stdclass.cpp b/core/stdclass.cpp index 52af52000..713591228 100644 --- a/core/stdclass.cpp +++ b/core/stdclass.cpp @@ -195,14 +195,12 @@ void cResetEvent::Reset() bool cResetEvent::Wait(u32 msec) { - bool rc = true; + std::unique_lock lock(mutx); - std::unique_lock lock(mutx); - - if (!state) { - rc = (cond.wait_for(lock, std::chrono::milliseconds(msec)) == std::cv_status::no_timeout); - } + if (!state) + cond.wait_for(lock, std::chrono::milliseconds(msec)); + bool rc = state; state = false; return rc;