From 65a130c33d603589100a2536f92a318b1858574c Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sun, 5 Feb 2023 18:41:42 -0500 Subject: [PATCH] Hot setting and misc opt --- indra/newview/llfloaterjoystick.cpp | 4 ++-- indra/newview/lltextureview.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 829d6d20ec9..a797661d62f 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -121,9 +121,9 @@ void LLFloaterJoystick::draw() { F32 minbar, maxbar; mAxisStatsBar[i]->getRange(minbar, maxbar); - if (llabs(value) > maxbar) + F32 range = llabs(value); + if (range > maxbar) { - F32 range = llabs(value); mAxisStatsBar[i]->setRange(-range, range); } } diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 456b4e40715..7d085b13de9 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -625,7 +625,8 @@ void LLGLTexMemBar::draw() &x_right, FALSE); F32Kilobits bandwidth(LLAppViewer::getTextureFetch()->getTextureBandwidth()); - F32Kilobits max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS")); + static LLCachedControl<F32> band_width(gSavedSettings,"ThrottleBandwidthKBPS", 3000.0f); + F32Kilobits max_bandwidth(band_width()); color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color; color[VALPHA] = text_color[VALPHA]; text = llformat("BW:%.0f/%.0f",bandwidth.value(), max_bandwidth.value()); -- GitLab