diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llwindow/lldxhardware.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/linden/indra/llwindow/lldxhardware.cpp b/linden/indra/llwindow/lldxhardware.cpp index beab131..e0cb82d 100644 --- a/linden/indra/llwindow/lldxhardware.cpp +++ b/linden/indra/llwindow/lldxhardware.cpp | |||
@@ -624,7 +624,37 @@ LLSD LLDXHardware::getDisplayInfo() | |||
624 | ret["DeviceName"] = device_name; | 624 | ret["DeviceName"] = device_name; |
625 | std::string device_driver= get_string(device_containerp, L"szDriverVersion"); | 625 | std::string device_driver= get_string(device_containerp, L"szDriverVersion"); |
626 | ret["DriverVersion"] = device_driver; | 626 | ret["DriverVersion"] = device_driver; |
627 | } | 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 | |||
628 | LCleanup: | 658 | LCleanup: |
629 | SAFE_RELEASE(file_containerp); | 659 | SAFE_RELEASE(file_containerp); |
630 | SAFE_RELEASE(driver_containerp); | 660 | SAFE_RELEASE(driver_containerp); |