diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 829d6d20ec93e7193052fe44cf11cc576d094134..a797661d62fa85424c64c496fc33fe3e9844472a 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 456b4e407152f57bcbc2496b5f2c817568829d75..7d085b13de979d64cf14986004621bdaa332f5e4 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());