Add THREADS_ENABLED macro in order to compile Godot to run on the main thread
This commit is contained in:
@ -33,6 +33,8 @@
|
||||
|
||||
#include "core/os/mutex.h"
|
||||
|
||||
#ifdef THREADS_ENABLED
|
||||
|
||||
#ifdef MINGW_ENABLED
|
||||
#define MINGW_STDTHREAD_REDUNDANCY_WARNING
|
||||
#include "thirdparty/mingw-std-threads/mingw.condition_variable.h"
|
||||
@ -66,4 +68,16 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#else // No threads.
|
||||
|
||||
class ConditionVariable {
|
||||
public:
|
||||
template <class BinaryMutexT>
|
||||
void wait(const MutexLock<BinaryMutexT> &p_lock) const {}
|
||||
void notify_one() const {}
|
||||
void notify_all() const {}
|
||||
};
|
||||
|
||||
#endif // THREADS_ENABLED
|
||||
|
||||
#endif // CONDITION_VARIABLE_H
|
||||
|
||||
Reference in New Issue
Block a user