summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2009-06-22 15:02:19 -0700
committerBryan O'Sullivan <bos@lindenlab.com>2009-06-22 15:02:19 -0700
commitbaa73fddd9287ddafd2d31551cb253b355ed910a (patch)
treee3f0986617fe6c0ee0a14df6aac13c6bb6f92507 /indra/llwindow
parentdc3833f31b8a20220ddb1775e1625c016c397435 (diff)
parentfcaa1ad46fd1df4cfec9dee12caf6e7b5bf32136 (diff)
Merge with viewer-2.0.0-3 branch
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/lldxhardware.cpp32
-rw-r--r--indra/llwindow/llwindowmesaheadless.cpp5
-rw-r--r--indra/llwindow/llwindowmesaheadless.h3
-rw-r--r--indra/llwindow/llwindowwin32.cpp3
4 files changed, 39 insertions, 4 deletions
diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp
index d33a0a6eea..d8058baf53 100644
--- a/indra/llwindow/lldxhardware.cpp
+++ b/indra/llwindow/lldxhardware.cpp
@@ -625,7 +625,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);
diff --git a/indra/llwindow/llwindowmesaheadless.cpp b/indra/llwindow/llwindowmesaheadless.cpp
index c1f9d2095e..7ee09f4a24 100644
--- a/indra/llwindow/llwindowmesaheadless.cpp
+++ b/indra/llwindow/llwindowmesaheadless.cpp
@@ -44,10 +44,11 @@ U16 *gMesaBuffer = NULL;
//
// LLWindowMesaHeadless
//
-LLWindowMesaHeadless::LLWindowMesaHeadless(const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
+LLWindowMesaHeadless::LLWindowMesaHeadless(LLWindowCallbacks* callbacks,
+ const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clearBg,
BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth)
- : LLWindow(fullscreen, flags)
+ : LLWindow(callbacks, fullscreen, flags)
{
if (use_gl)
{
diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h
index ab562d9ffe..22e0ec126d 100644
--- a/indra/llwindow/llwindowmesaheadless.h
+++ b/indra/llwindow/llwindowmesaheadless.h
@@ -98,7 +98,8 @@ public:
/*virtual*/ void *getPlatformWindow() { return 0; };
/*virtual*/ void bringToFront() {};
- LLWindowMesaHeadless(const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
+ LLWindowMesaHeadless(LLWindowCallbacks* callbacks,
+ const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height,
U32 flags, BOOL fullscreen, BOOL clearBg,
BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
~LLWindowMesaHeadless();
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index b60740c7e4..ce1bc82168 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -60,6 +60,7 @@
#include <dinput.h>
#include <Dbt.h.>
+#include "llmemtype.h"
// culled from winuser.h
#ifndef WM_MOUSEWHEEL /* Added to be compatible with later SDK's */
const S32 WM_MOUSEWHEEL = 0x020A;
@@ -1593,6 +1594,8 @@ void LLWindowWin32::gatherInput()
MSG msg;
int msg_count = 0;
+ LLMemType m1(LLMemType::MTYPE_GATHER_INPUT);
+
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) && msg_count < MAX_MESSAGE_PER_UPDATE)
{
mCallbacks->handlePingWatchdog(this, "Main:TranslateGatherInput");