summaryrefslogtreecommitdiff
path: root/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
authormobserveur <mobserveur@gmail.com>2024-07-05 20:13:59 +0200
committermobserveur <mobserveur@gmail.com>2024-07-05 20:13:59 +0200
commit9f62ef6cb34ebc91aa82715ce8b036c0af7affef (patch)
tree8d7afa7a264f32a84031caf7a393416f81efefd0 /indra/newview/llstatusbar.cpp
parent6369047dcb74323b248de59bc8187db0d315548a (diff)
Tuning floater and buffer mapping improvements
This commit adds the tuning floater accessible via the fps button, and improvements to the buffer mapping optimisation modes.
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r--indra/newview/llstatusbar.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index a0a625c5fc..eecf9c60b6 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -166,7 +166,9 @@ BOOL LLStatusBar::postBuild()
gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3));
mTextTime = getChild<LLTextBox>("TimeText" );
- mTextFps = getChild<LLTextBox>("FpsText");
+
+ mTextFps = getChild<LLButton>("FpsText");
+ mTextFps->setClickedCallback( &LLStatusBar::onClickFps, this );
getChild<LLUICtrl>("buyL")->setCommitCallback(
boost::bind(&LLStatusBar::onClickBuyCurrency, this));
@@ -306,7 +308,8 @@ void LLStatusBar::refresh()
S32 fps = (S32) llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, 50));
std::string fpsStr = std::to_string(fps);
- mTextFps->setText(fpsStr);
+ //mTextFps->setText(fpsStr);
+ mTextFps->setLabel(fpsStr);
}
// update clock every 10 seconds
@@ -649,6 +652,12 @@ void LLStatusBar::onClickMediaToggle(void* data)
LLViewerMedia::getInstance()->setAllMediaPaused(pause);
}
+//static
+void LLStatusBar::onClickFps(void* data)
+{
+ LLFloaterReg::toggleInstance("mpv_performance");
+}
+
BOOL can_afford_transaction(S32 cost)
{
return((cost <= 0)||((gStatusBar) && (gStatusBar->getBalance() >=cost)));