From d29b3e612ae7f4e5025e67f26d4f8190e0a77b71 Mon Sep 17 00:00:00 2001 From: gnick79 Date: Fri, 4 Feb 2011 23:44:11 +0000 Subject: * Italian translation update + some little GUI adjustements git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7066 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/CPUDetect.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'Source/Core/Common/Src/CPUDetect.cpp') diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index d21bc9e0cd..0f264fdde8 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -168,13 +168,18 @@ void CPUInfo::Detect() if (cpu_id[2] & 2) cmp_legacy = true; //wtf is this? if ((cpu_id[3] >> 29) & 1) bLongMode = true; } + + num_cores = logical_cpu_count; + if (max_ex_fn >= 0x80000008) { // Get number of cores. This is a bit complicated. Following AMD manual here. __cpuid(cpu_id, 0x80000008); int apic_id_core_id_size = (cpu_id[2] >> 12) & 0xF; if (apic_id_core_id_size == 0) { - num_cores = logical_cpu_count; if (ht) { + if (vendor == VENDOR_OTHER) { + num_cores = 1; + } // New mechanism for modern Intel CPUs. if (HTT) { __cpuid(cpu_id, 0x00000004); @@ -183,20 +188,14 @@ void CPUInfo::Detect() num_cores = (cores_x_package > 1) ? cores_x_package : num_cores; logical_cpu_count /= cores_x_package; } - } - else - { + } else { num_cores = 1; } } else { // Use AMD's new method. num_cores = (cpu_id[2] & 0xFF) + 1; } - } else { - // Wild guess - if (logical_cpu_count) - num_cores = logical_cpu_count; - } + } } // Turn the cpu info into a string we can show -- cgit v1.2.3