summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2018-11-12 15:31:19 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2018-11-12 15:31:19 +0200
commit2d222309500a667cd8880172daa8f3d2088596b6 (patch)
tree63ecd9f73440cda42148e54c478785433eae5d18 /indra/llcommon
parent93f60cfe1d9d6243768fd1f8f2fa7e11bf94793d (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.cpp24
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);