summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/CPUDetect.cpp
diff options
context:
space:
mode:
authorgnick79 <gnick79@gmail.com>2011-02-04 23:44:11 +0000
committergnick79 <gnick79@gmail.com>2011-02-04 23:44:11 +0000
commitd29b3e612ae7f4e5025e67f26d4f8190e0a77b71 (patch)
treeddf9450875ca18985159c3e2882645a8f1ac3a69 /Source/Core/Common/Src/CPUDetect.cpp
parentd5df148fc293d6587e9800c9cdbebcb51131e150 (diff)
* Italian translation update
+ some little GUI adjustements git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7066 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/CPUDetect.cpp')
-rw-r--r--Source/Core/Common/Src/CPUDetect.cpp17
1 files changed, 8 insertions, 9 deletions
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