From 4a0c4a69f04ba3bf074aec63968aeceeb41fb3f5 Mon Sep 17 00:00:00 2001 From: XXTH Date: Fri, 12 May 2023 13:32:01 +0200 Subject: [PATCH] added comments --- Engine/source/platformSDL/sdlCPUInfo.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Engine/source/platformSDL/sdlCPUInfo.cpp b/Engine/source/platformSDL/sdlCPUInfo.cpp index 76040e250..a02b5149c 100644 --- a/Engine/source/platformSDL/sdlCPUInfo.cpp +++ b/Engine/source/platformSDL/sdlCPUInfo.cpp @@ -19,7 +19,10 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- -// XXTH used for FreeBSD, SDL_cpuinfo dont tell me the cpu name +// XXTH used for FreeBSD +// Note: SDL_cpuinfo have not all information, but better than using +// "sysctl hw" +// //----------------------------------------------------------------------------- #if defined( __FreeBSD__ ) #include "SDL.h" @@ -35,13 +38,12 @@ Platform::SystemInfo_struct Platform::SystemInfo; void Processor::init() { - //sdl dont have logical/physical CPU count so ... time to guess - //modern CPU usually should have isHyperThreaded S32 lCpuCount = SDL_GetCPUCount(); Platform::SystemInfo.processor.numLogicalProcessors = lCpuCount; + //sdl dont have logical/physical CPU count so ... time to guess Platform::SystemInfo.processor.numPhysicalProcessors = 1; // :/ lCpuCount; Platform::SystemInfo.processor.isMultiCore = lCpuCount > 1; - //since logical and physical is equal set to false mhh better true + //modern CPU should have isHyperThreaded Platform::SystemInfo.processor.isHyperThreaded = true; //hackfest