diff --git a/checkin_notes b/checkin_notes index 0b1437fe5d..6140cc9a1e 100755 --- a/checkin_notes +++ b/checkin_notes @@ -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 + \ No newline at end of file diff --git a/client/win/hostinfo_win.cpp b/client/win/hostinfo_win.cpp index bc5eee8dba..1e33de7c08 100755 --- a/client/win/hostinfo_win.cpp +++ b/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; }