diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2018-11-12 15:31:19 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2018-11-12 15:31:19 +0200 |
commit | 2d222309500a667cd8880172daa8f3d2088596b6 (patch) | |
tree | 63ecd9f73440cda42148e54c478785433eae5d18 /indra/llcommon | |
parent | 93f60cfe1d9d6243768fd1f8f2fa7e11bf94793d (diff) |
SL-9935 Include full win10 build number in Help > About Second Life and logs
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llsys.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 1ef6c538ba..1f8d558fbe 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -268,10 +268,32 @@ LLOSInfo::LLOSInfo() : } } + S32 ubr = 0; // Windows 10 Update Build Revision, can be retrieved from a registry + if (mMajorVer == 10) + { + DWORD cbData(sizeof(DWORD)); + DWORD data(0); + HKEY key; + BOOL ret_code = RegOpenKeyExW(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 0, KEY_READ, &key); + if (ERROR_SUCCESS == ret_code) + { + ret_code = RegQueryValueExW(key, L"UBR", 0, NULL, reinterpret_cast<LPBYTE>(&data), &cbData); + if (ERROR_SUCCESS == ret_code) + { + ubr = data; + } + } + } + mOSString = mOSStringSimple; if (mBuild > 0) { - mOSString += llformat("(Build %d)", mBuild); + mOSString += llformat("(Build %d", mBuild); + if (ubr > 0) + { + mOSString += llformat(".%d", ubr); + } + mOSString += ")"; } LLStringUtil::trim(mOSStringSimple); |