summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorAdam Moss <moss@lindenlab.com>2009-05-22 09:58:47 +0000
committerAdam Moss <moss@lindenlab.com>2009-05-22 09:58:47 +0000
commit9dfe0ca9a0228c4fa75c8a3e51840696cc6b4960 (patch)
tree3136e0a32cdcb1d55a4c3a5a67791ca128d947a5 /indra/llwindow
parent93cf3d89e51835dd2f61c32b16191ab724528055 (diff)
svn merge -r121194:121210
svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-1.23.onetwo-merge-1 QAR-1531 viewer 1.23rc1+1.23rc2 merge to trunk
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/lldxhardware.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index beab131856..e0cb82d2be 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -624,7 +624,37 @@ LLSD LLDXHardware::getDisplayInfo()
ret["DeviceName"] = device_name;
std::string device_driver= get_string(device_containerp, L"szDriverVersion");
ret["DriverVersion"] = device_driver;
- }
+
+ // ATI has a slightly different version string
+ if(device_name.length() >= 4 && device_name.substr(0,4) == "ATI ")
+ {
+ // get the key
+ HKEY hKey;
+ const DWORD RV_SIZE = 100;
+ WCHAR release_version[RV_SIZE];
+
+ // Hard coded registry entry. Using this since it's simpler for now.
+ // And using EnumDisplayDevices to get a registry key also requires
+ // a hard coded Query value.
+ if(ERROR_SUCCESS == RegOpenKey(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\ATI Technologies\\CBT"), &hKey))
+ {
+ // get the value
+ DWORD dwType = REG_SZ;
+ DWORD dwSize = sizeof(WCHAR) * RV_SIZE;
+ if(ERROR_SUCCESS == RegQueryValueEx(hKey, TEXT("ReleaseVersion"),
+ NULL, &dwType, (LPBYTE)release_version, &dwSize))
+ {
+ // print the value
+ // windows doesn't guarantee to be null terminated
+ release_version[RV_SIZE - 1] = NULL;
+ ret["DriverVersion"] = utf16str_to_utf8str(release_version);
+
+ }
+ RegCloseKey(hKey);
+ }
+ }
+ }
+
LCleanup:
SAFE_RELEASE(file_containerp);
SAFE_RELEASE(driver_containerp);