summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/CPUDetect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/Src/CPUDetect.cpp')
-rw-r--r--Source/Core/Common/Src/CPUDetect.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp
index 45aed22d17..077985a2b7 100644
--- a/Source/Core/Common/Src/CPUDetect.cpp
+++ b/Source/Core/Common/Src/CPUDetect.cpp
@@ -174,7 +174,7 @@ void CPUInfo::Detect()
if ((cpu_id[3] >> 29) & 1) bLongMode = true;
}
- num_cores = logical_cpu_count;
+ num_cores = (logical_cpu_count == 0) ? 1 : logical_cpu_count;
if (max_ex_fn >= 0x80000008) {
// Get number of cores. This is a bit complicated. Following AMD manual here.
@@ -190,11 +190,7 @@ void CPUInfo::Detect()
cores_x_package = ((logical_cpu_count % cores_x_package) == 0) ? cores_x_package : 1;
num_cores = (cores_x_package > 1) ? cores_x_package : num_cores;
logical_cpu_count /= cores_x_package;
- } else if (vendor == VENDOR_OTHER) { //trash block!!??
- num_cores = 1;
}
- } else { //trash block!!??
- num_cores = 1;
}
} else {
// Use AMD's new method.