mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=10157
This commit is contained in:
parent
aa3b8430af
commit
e40962d2ad
|
@ -4809,3 +4809,11 @@ Rom 16 May 2006
|
|||
lib/
|
||||
diagnostics_win.C
|
||||
hostinfo.C, .h
|
||||
|
||||
Rom 16 May 2006
|
||||
- Core client needs to still support Win95, so make the processor
|
||||
feature detection code work on Win95.
|
||||
|
||||
client/win/
|
||||
hostinfo_win.cpp
|
||||
|
|
@ -480,6 +480,10 @@ BOOL test_processor_feature(DWORD feature) {
|
|||
|
||||
|
||||
// Detect to see if a processor feature is available for use
|
||||
|
||||
// IsProcessorFeaturePresent()
|
||||
typedef BOOL (__stdcall *tIPFP)( IN DWORD dwFeature );
|
||||
|
||||
BOOL is_processor_feature_supported(DWORD feature) {
|
||||
// Detect platform information
|
||||
OSVERSIONINFO osvi;
|
||||
|
@ -491,7 +495,17 @@ BOOL is_processor_feature_supported(DWORD feature) {
|
|||
// run a quick test.
|
||||
return test_processor_feature(feature);
|
||||
} else {
|
||||
return IsProcessorFeaturePresent(feature);
|
||||
HMODULE hKernel32Lib = GetModuleHandle("kernel32.dll");
|
||||
tIPFP pIPFP = (tIPFP)GetProcAddress(hKernel32Lib, "IsProcessorFeaturePresent");
|
||||
if (pIPFP) {
|
||||
// IsProcessorFeaturePresent is available, use it.
|
||||
return pIPFP(feature);
|
||||
} else {
|
||||
// Ooooppppssss, whichever version of Windows we are running on
|
||||
// doesn't support IsProcessorFeaturePresent, so just test things
|
||||
// out.
|
||||
return test_processor_feature(feature);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue