Use mingw-std-threads in MinGW builds

This commit is contained in:
Pedro J. Estébanez
2023-11-17 20:44:38 +01:00
parent ad72de5083
commit fe4850c0d0
29 changed files with 2342 additions and 28 deletions

View File

@ -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 {