1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #64815 from RandomShaper/default_cpu_count

Improve default `OS`'s CPU count getter
This commit is contained in:
Rémi Verschelde
2022-10-06 08:55:51 +02:00
5 changed files with 2 additions and 19 deletions

View File

@@ -38,6 +38,7 @@
#include "core/version_generated.gen.h"
#include <stdarg.h>
#include <thread>
OS *OS::singleton = nullptr;
uint64_t OS::target_ticks = 0;
@@ -321,7 +322,7 @@ String OS::get_unique_id() const {
}
int OS::get_processor_count() const {
return 1;
return std::thread::hardware_concurrency();
}
String OS::get_processor_name() const {