mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 00:03:58 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user