From 75bba68a034723d81f4e3ab837a1b51b8a483f99 Mon Sep 17 00:00:00 2001 From: Palana Date: Sat, 12 Jul 2014 20:30:50 +0200 Subject: [PATCH] Fix obs-cocoa CPU cores log output According to http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-2a-manual.html the cores_per_package and logical_per_package returns the maximum number of (logical) cores addressable per package instead of the actual number of (logical) cores --- libobs/obs-cocoa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libobs/obs-cocoa.c b/libobs/obs-cocoa.c index 1686f4ff3..24fa69e6f 100644 --- a/libobs/obs-cocoa.c +++ b/libobs/obs-cocoa.c @@ -102,12 +102,12 @@ static void log_processor_cores(void) int ret; size = sizeof(physical_cores); - ret = sysctlbyname("machdep.cpu.cores_per_package", &physical_cores, + ret = sysctlbyname("machdep.cpu.core_count", &physical_cores, &size, NULL, 0); if (ret != 0) return; - ret = sysctlbyname("machdep.cpu.logical_per_package", &logical_cores, + ret = sysctlbyname("machdep.cpu.thread_count", &logical_cores, &size, NULL, 0); if (ret != 0) return;