From b7e73102caa74c56a042313b11e4b17841ed3f19 Mon Sep 17 00:00:00 2001 From: nodchip Date: Wed, 24 Feb 2010 10:10:48 +0000 Subject: Fixed the issue that cpu_info is not initialized in plugin. This commit enables SSSE3/SSE4.1 codes in rev5119. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5120 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/CPUDetect.cpp | 4 ++++ Source/Core/Common/Src/CPUDetect.h | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index cd77d37346..5fcc7062d9 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -78,6 +78,10 @@ void __cpuid(int info[4], int x) CPUInfo cpu_info; +CPUInfo::CPUInfo() { + Detect(); +} + // Detects the various cpu features void CPUInfo::Detect() { diff --git a/Source/Core/Common/Src/CPUDetect.h b/Source/Core/Common/Src/CPUDetect.h index 55a0de93c9..55c6b62b3b 100644 --- a/Source/Core/Common/Src/CPUDetect.h +++ b/Source/Core/Common/Src/CPUDetect.h @@ -52,12 +52,16 @@ struct CPUInfo bool bSSE4A; bool bLAHFSAHF64; bool bLongMode; - - // Detects the various cpu features - void Detect(); + // Call Detect() + explicit CPUInfo(); + // Turn the cpu info into a string we can show std::string Summarize(); + +private: + // Detects the various cpu features + void Detect(); }; extern CPUInfo cpu_info; -- cgit v1.2.3