diff options
Diffstat (limited to 'indra/llcommon/llsys.cpp')
-rwxr-xr-x | indra/llcommon/llsys.cpp | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index bb17725c9c..0730b2ed8b 100755 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -114,9 +114,6 @@ static const F32 MEM_INFO_THROTTLE = 20; static const F32 MEM_INFO_WINDOW = 10*60; #if LL_WINDOWS -// We cannot trust GetVersionEx function on Win8.1 , we should check this value when creating OS string -static const U32 WINNT_WINBLUE = 0x0603; - #ifndef DLLVERSIONINFO typedef struct _DllVersionInfo { @@ -217,26 +214,6 @@ static bool regex_search_no_exc(const S& string, M& match, const R& regex) } } -#if LL_WINDOWS -// GetVersionEx should not works correct with Windows 8.1 and the later version. We need to check this case -static bool check_for_version(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor) -{ - OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0 }; - DWORDLONG const dwlConditionMask = VerSetConditionMask( - VerSetConditionMask( - VerSetConditionMask( - 0, VER_MAJORVERSION, VER_GREATER_EQUAL), - VER_MINORVERSION, VER_GREATER_EQUAL), - VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL); - - osvi.dwMajorVersion = wMajorVersion; - osvi.dwMinorVersion = wMinorVersion; - osvi.wServicePackMajor = wServicePackMajor; - - return VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE; -} -#endif - LLOSInfo::LLOSInfo() : mMajorVer(0), mMinorVer(0), mBuild(0), mOSVersionString("") @@ -245,7 +222,6 @@ LLOSInfo::LLOSInfo() : #if LL_WINDOWS OSVERSIONINFOEX osvi; BOOL bOsVersionInfoEx; - BOOL bShouldUseShellVersion = false; // Try calling GetVersionEx using the OSVERSIONINFOEX structure. ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); @@ -308,18 +284,10 @@ LLOSInfo::LLOSInfo() : } else if(osvi.dwMinorVersion == 2) { - if (check_for_version(HIBYTE(WINNT_WINBLUE), LOBYTE(WINNT_WINBLUE), 0)) - { - mOSStringSimple = "Microsoft Windows 8.1 "; - bShouldUseShellVersion = true; // GetVersionEx failed, going to use shell version - } + if(osvi.wProductType == VER_NT_WORKSTATION) + mOSStringSimple = "Microsoft Windows 8 "; else - { - if(osvi.wProductType == VER_NT_WORKSTATION) - mOSStringSimple = "Microsoft Windows 8 "; - else - mOSStringSimple = "Windows Server 2012 "; - } + mOSStringSimple = "Windows Server 2012 "; } ///get native system info if available.. @@ -386,8 +354,9 @@ LLOSInfo::LLOSInfo() : } else { - tmpstr = !bShouldUseShellVersion ? llformat("%s (Build %d)", csdversion.c_str(), (osvi.dwBuildNumber & 0xffff)): - llformat("%s (Build %d)", csdversion.c_str(), shell32_build); + tmpstr = llformat("%s (Build %d)", + csdversion.c_str(), + (osvi.dwBuildNumber & 0xffff)); } mOSString = mOSStringSimple + tmpstr; @@ -423,7 +392,7 @@ LLOSInfo::LLOSInfo() : std::string compatibility_mode; if(got_shell32_version) { - if((osvi.dwMajorVersion != shell32_major || osvi.dwMinorVersion != shell32_minor) && !bShouldUseShellVersion) + if(osvi.dwMajorVersion != shell32_major || osvi.dwMinorVersion != shell32_minor) { compatibility_mode = llformat(" compatibility mode. real ver: %d.%d (Build %d)", shell32_major, |