From 36a596422e4cfef6d3d173f972f015535189ce95 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Wed, 12 Jan 2022 17:06:06 +0100 Subject: [PATCH] feat: added cores number to the GPU information (Apple Silicon) --- Kit/plugins/SystemKit.swift | 2 ++ Stats/Views/Dashboard.swift | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Kit/plugins/SystemKit.swift b/Kit/plugins/SystemKit.swift index 22e93613..f830ce3b 100644 --- a/Kit/plugins/SystemKit.swift +++ b/Kit/plugins/SystemKit.swift @@ -57,6 +57,7 @@ public struct gpu_s { public var name: String? = nil public var vendor: String? = nil public var vram: String? = nil + public var cores: Int? = nil } public struct disk_s { @@ -227,6 +228,7 @@ public class SystemKit { gpu.name = obj["sppci_model"] as? String gpu.vendor = obj["spdisplays_vendor"] as? String + gpu.cores = Int(obj["sppci_cores"] as? String ?? "") if let vram = obj["spdisplays_vram_shared"] as? String { gpu.vram = vram diff --git a/Stats/Views/Dashboard.swift b/Stats/Views/Dashboard.swift index a9d21a71..f2499011 100644 --- a/Stats/Views/Dashboard.swift +++ b/Stats/Views/Dashboard.swift @@ -263,8 +263,19 @@ class Dashboard: NSScrollView { for i in 0..