summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2017-05-18 15:33:58 -0400
committerOz Linden <oz@lindenlab.com>2017-05-18 15:33:58 -0400
commit013f34ccdd1df275a02e6ca56f8f19b51413b35a (patch)
treee9a88852afc69ef7b4642cb9820e1c31772c1c40 /indra/newview/llviewerwindow.cpp
parentab3742a2a944ee8535e314ebfad52a980e079a70 (diff)
parent4bf1f1d618d61f0cc2ec0dd22cea7d1c5b909b8f (diff)
merge latest updates from coyot
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp28
1 files changed, 23 insertions, 5 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 7a60a8e9ac..feed5ba43d 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -53,6 +53,7 @@
#include "llrender.h"
#include "llvoiceclient.h" // for push-to-talk button handling
+#include "stringize.h"
//
// TODO: Many of these includes are unnecessary. Remove them.
@@ -394,7 +395,8 @@ public:
#if LL_WINDOWS
if (gSavedSettings.getBOOL("DebugShowMemory"))
{
- addText(xpos, ypos, llformat("Memory: %d (KB)", LLMemory::getWorkingSetSize() / 1024));
+ addText(xpos, ypos,
+ STRINGIZE("Memory: " << (LLMemory::getCurrentRSS() / 1024) << " (KB)"));
ypos += y_inc;
}
#endif
@@ -2724,8 +2726,16 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
return TRUE;
}
- if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask))
- ||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)))
+ if (gAgent.isInitialized()
+ && (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE || gAgent.getTeleportState() == LLAgent::TELEPORT_LOCAL)
+ && gMenuBarView
+ && gMenuBarView->handleAcceleratorKey(key, mask))
+ {
+ LLViewerEventRecorder::instance().logKeyEvent(key, mask);
+ return TRUE;
+ }
+
+ if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
return TRUE;
@@ -2855,8 +2865,16 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
}
// give menus a chance to handle unmodified accelerator keys
- if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask))
- ||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)))
+ if (gAgent.isInitialized()
+ && (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE || gAgent.getTeleportState() == LLAgent::TELEPORT_LOCAL)
+ && gMenuBarView
+ && gMenuBarView->handleAcceleratorKey(key, mask))
+ {
+ LLViewerEventRecorder::instance().logKeyEvent(key, mask);
+ return TRUE;
+ }
+
+ if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))
{
return TRUE;
}