summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/CPUDetect.cpp
diff options
context:
space:
mode:
authorgnick79 <gnick79@gmail.com>2011-01-29 21:13:56 +0000
committergnick79 <gnick79@gmail.com>2011-01-29 21:13:56 +0000
commit3078db08c7e5d8b176a3af9855d22f99d1e3f1bb (patch)
treeb441c770a3fa5ea238faf7dc611272159c25e1ca /Source/Core/Common/Src/CPUDetect.cpp
parent7f97ce79bbf11dfa9d28f8844c7567566aa9c7d4 (diff)
* Changed the Projection Hack option in game properties to "Custom Projection Hack"
- dislocating all sensible stuff related to "values per game/pattern" outside the sourcecode. - giving more control to end-users across the user-friendly interface. - deleting/cleaning some dead variables. - updating all gameconfig.ini data to reflect new PHack concept (pending upload). * Updated Italian translation - Includes corrections, a better strings translating and suggestions directly by Google Code's people. + Minor old pending changes... git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6973 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/CPUDetect.cpp')
-rw-r--r--Source/Core/Common/Src/CPUDetect.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp
index 195ffba249..690875ec60 100644
--- a/Source/Core/Common/Src/CPUDetect.cpp
+++ b/Source/Core/Common/Src/CPUDetect.cpp
@@ -138,10 +138,8 @@ void CPUInfo::Detect()
if (max_std_fn >= 1) {
__cpuid(cpu_id, 0x00000001);
logical_cpu_count = (cpu_id[1] >> 16) & 0xFF;
- if ((cpu_id[3] >> 28) & 1) {
- // wtf, we get here on my core 2
- HTT = true;
- }
+ // HTT is valid for intel processors only.
+ HTT = ((cpu_id[3] >> 28) & 1) && vendor == VENDOR_INTEL;
if ((cpu_id[3] >> 25) & 1) bSSE = true;
if ((cpu_id[3] >> 26) & 1) bSSE2 = true;
if ((cpu_id[2]) & 1) bSSE3 = true;
@@ -175,7 +173,7 @@ void CPUInfo::Detect()
if (apic_id_core_id_size == 0) {
// New mechanism for modern CPUs.
num_cores = logical_cpu_count;
- if (HTT && vendor == VENDOR_INTEL) {
+ if (HTT) {
__cpuid(cpu_id, 0x00000004);
int cores_x_package = ((cpu_id[0] >> 26) & 0x3F) + 1;
cores_x_package = ((logical_cpu_count % cores_x_package) == 0) ? cores_x_package : 1;
@@ -202,7 +200,7 @@ std::string CPUInfo::Summarize()
else
{
sum = StringFromFormat("%s, %i cores", cpu_string, num_cores);
- if (HTT && vendor == VENDOR_INTEL) sum += StringFromFormat(" (%i logical IDs per physical core)", logical_cpu_count);
+ if (HTT) sum += StringFromFormat(" (%i logical IDs per physical core)", logical_cpu_count);
}
if (bSSE) sum += ", SSE";
if (bSSE2) sum += ", SSE2";