diff options
Diffstat (limited to 'linden/indra/llwindow/lldxhardware.cpp')
-rw-r--r-- | linden/indra/llwindow/lldxhardware.cpp | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/linden/indra/llwindow/lldxhardware.cpp b/linden/indra/llwindow/lldxhardware.cpp index deb7901..e0cb82d 100644 --- a/linden/indra/llwindow/lldxhardware.cpp +++ b/linden/indra/llwindow/lldxhardware.cpp | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -623,7 +624,37 @@ LLSD LLDXHardware::getDisplayInfo() | |||
623 | ret["DeviceName"] = device_name; | 624 | ret["DeviceName"] = device_name; |
624 | std::string device_driver= get_string(device_containerp, L"szDriverVersion"); | 625 | std::string device_driver= get_string(device_containerp, L"szDriverVersion"); |
625 | ret["DriverVersion"] = device_driver; | 626 | ret["DriverVersion"] = device_driver; |
626 | } | 627 | |
628 | // ATI has a slightly different version string | ||
629 | if(device_name.length() >= 4 && device_name.substr(0,4) == "ATI ") | ||
630 | { | ||
631 | // get the key | ||
632 | HKEY hKey; | ||
633 | const DWORD RV_SIZE = 100; | ||
634 | WCHAR release_version[RV_SIZE]; | ||
635 | |||
636 | // Hard coded registry entry. Using this since it's simpler for now. | ||
637 | // And using EnumDisplayDevices to get a registry key also requires | ||
638 | // a hard coded Query value. | ||
639 | if(ERROR_SUCCESS == RegOpenKey(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\ATI Technologies\\CBT"), &hKey)) | ||
640 | { | ||
641 | // get the value | ||
642 | DWORD dwType = REG_SZ; | ||
643 | DWORD dwSize = sizeof(WCHAR) * RV_SIZE; | ||
644 | if(ERROR_SUCCESS == RegQueryValueEx(hKey, TEXT("ReleaseVersion"), | ||
645 | NULL, &dwType, (LPBYTE)release_version, &dwSize)) | ||
646 | { | ||
647 | // print the value | ||
648 | // windows doesn't guarantee to be null terminated | ||
649 | release_version[RV_SIZE - 1] = NULL; | ||
650 | ret["DriverVersion"] = utf16str_to_utf8str(release_version); | ||
651 | |||
652 | } | ||
653 | RegCloseKey(hKey); | ||
654 | } | ||
655 | } | ||
656 | } | ||
657 | |||
627 | LCleanup: | 658 | LCleanup: |
628 | SAFE_RELEASE(file_containerp); | 659 | SAFE_RELEASE(file_containerp); |
629 | SAFE_RELEASE(driver_containerp); | 660 | SAFE_RELEASE(driver_containerp); |