Use mingw-std-threads in MinGW builds
This commit is contained in:
@ -39,7 +39,15 @@
|
||||
#include "core/version_generated.gen.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef MINGW_ENABLED
|
||||
#define MINGW_STDTHREAD_REDUNDANCY_WARNING
|
||||
#include "thirdparty/mingw-std-threads/mingw.thread.h"
|
||||
#define THREADING_NAMESPACE mingw_stdthread
|
||||
#else
|
||||
#include <thread>
|
||||
#define THREADING_NAMESPACE std
|
||||
#endif
|
||||
|
||||
OS *OS::singleton = nullptr;
|
||||
uint64_t OS::target_ticks = 0;
|
||||
@ -359,7 +367,7 @@ String OS::get_unique_id() const {
|
||||
}
|
||||
|
||||
int OS::get_processor_count() const {
|
||||
return std::thread::hardware_concurrency();
|
||||
return THREADING_NAMESPACE::thread::hardware_concurrency();
|
||||
}
|
||||
|
||||
String OS::get_processor_name() const {
|
||||
|
||||
Reference in New Issue
Block a user