diff --git a/stepmania/src/arch/Threads/Threads.h b/stepmania/src/arch/Threads/Threads.h index 6759382b25..d7a28dba5d 100644 --- a/stepmania/src/arch/Threads/Threads.h +++ b/stepmania/src/arch/Threads/Threads.h @@ -49,6 +49,7 @@ public: virtual bool Wait( RageTimer *pTimeout ) = 0; virtual void Signal() = 0; virtual void Broadcast() = 0; + virtual bool WaitTimeoutSupported() const = 0; }; class SemaImpl diff --git a/stepmania/src/arch/Threads/Threads_Pthreads.cpp b/stepmania/src/arch/Threads/Threads_Pthreads.cpp index cd16b5abb5..b83311db8d 100644 --- a/stepmania/src/arch/Threads/Threads_Pthreads.cpp +++ b/stepmania/src/arch/Threads/Threads_Pthreads.cpp @@ -348,12 +348,22 @@ bool EventImpl_Pthreads::Wait( RageTimer *pTimeout ) int iRet = pthread_cond_timedwait( &m_Cond, &m_pParent->mutex, &abstime ); return iRet != ETIMEDOUT; } + +bool EventImpl_Pthreads::WaitTimeoutSupported() const +{ + return true; +} #else bool EventImpl_Pthreads::Wait( RageTimer *pTimeout ) { pthread_cond_wait( &m_Cond, &m_pParent->mutex ); return true; } + +bool EventImpl_Pthreads::WaitTimeoutSupported() const +{ + return false; +} #endif void EventImpl_Pthreads::Signal() diff --git a/stepmania/src/arch/Threads/Threads_Pthreads.h b/stepmania/src/arch/Threads/Threads_Pthreads.h index ee1415f4af..38dcfe9714 100644 --- a/stepmania/src/arch/Threads/Threads_Pthreads.h +++ b/stepmania/src/arch/Threads/Threads_Pthreads.h @@ -55,6 +55,7 @@ public: bool Wait( RageTimer *pTimeout ); void Signal(); void Broadcast(); + bool WaitTimeoutSupported() const; private: MutexImpl_Pthreads *m_pParent; diff --git a/stepmania/src/arch/Threads/Threads_Win32.h b/stepmania/src/arch/Threads/Threads_Win32.h index 14b6b46ae8..cceadc8b65 100644 --- a/stepmania/src/arch/Threads/Threads_Win32.h +++ b/stepmania/src/arch/Threads/Threads_Win32.h @@ -49,6 +49,7 @@ public: bool Wait( RageTimer *pTimeout ); void Signal(); void Broadcast(); + bool WaitTimeoutSupported() const { return true; } private: MutexImpl_Win32 *m_pParent;