Support for dual CPU systems (#1417)

* [macOS] Added support for dual CPUs on Mac computers

Signed-off-by: Koneko <azimovp17@gmail.com>

* Change how number of cores is displayed when the system is dual CPU

* Support for dual CPU on Windows

* Dual CPU detection on Linux basic implementation

---------

Signed-off-by: Koneko <azimovp17@gmail.com>
This commit is contained in:
AzimovParviz
2024-11-26 02:53:01 +02:00
committed by GitHub
parent b76eb87510
commit 7535ce8a18
5 changed files with 22 additions and 2 deletions
+9 -1
View File
@@ -55,6 +55,9 @@ void ffPrintCPU(FFCPUOptions* options)
FF_STRBUF_AUTO_DESTROY str = ffStrbufCreate();
if(cpu.cpuCount > 1)
ffStrbufAppendF(&str, "%u x ", cpu.cpuCount);
if(cpu.name.length > 0)
ffStrbufAppend(&str, &cpu.name);
else if(cpu.vendor.length > 0)
@@ -68,7 +71,12 @@ void ffPrintCPU(FFCPUOptions* options)
if(coreTypes.length > 0)
ffStrbufAppendF(&str, " (%s)", coreTypes.chars);
else if(cpu.coresOnline > 1)
ffStrbufAppendF(&str, " (%u)", cpu.coresOnline);
{
if(cpu.cpuCount > 1)
ffStrbufAppendF(&str, " (%u)", cpu.coresOnline / 2);
else
ffStrbufAppendF(&str, " (%u)", cpu.coresOnline);
}
uint32_t freq = cpu.frequencyMax;
if(freq == 0)