From 6bf02c016236c2d79b3e8cf10cfb580157535e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Wed, 24 Aug 2022 09:50:33 +0200 Subject: Keep a single, portable implementation of `OS::get_processor_count()` --- core/os/os.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/os') diff --git a/core/os/os.cpp b/core/os/os.cpp index ee8da21751..62d6740685 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -38,6 +38,7 @@ #include "core/version_generated.gen.h" #include +#include 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 { -- cgit v1.2.3