From df459684d430910e44ddb1abc6f231c6d460442f Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 24 Jul 2024 15:02:09 -0400 Subject: Fix warning/misnamed button image PushButton_Disabled_Selected to PushButton_Selected_Disabled --- indra/newview/skins/default/xui/en/panel_scrolling_param.xml | 4 ++-- indra/newview/skins/default/xui/en/widgets/drop_down.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml index 2035bc2caa..ec642131ae 100644 --- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml +++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml @@ -84,7 +84,7 @@ enabled="false" height="132" image_disabled="PushButton_Disabled" - image_disabled_selected="PushButton_Disabled_Selected" + image_disabled_selected="PushButton_Selected_Disabled" image_selected="PushButton_Selected" image_unselected="PushButton_Off" layout="topleft" @@ -97,7 +97,7 @@ enabled="false" height="132" image_disabled="PushButton_Disabled" - image_disabled_selected="PushButton_Disabled_Selected" + image_disabled_selected="PushButton_Selected_Disabled" image_selected="PushButton_Selected" image_unselected="PushButton_Off" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/widgets/drop_down.xml b/indra/newview/skins/default/xui/en/widgets/drop_down.xml index 75ed485645..80f98b64fc 100644 --- a/indra/newview/skins/default/xui/en/widgets/drop_down.xml +++ b/indra/newview/skins/default/xui/en/widgets/drop_down.xml @@ -12,7 +12,7 @@ image_unselected="PushButton_Off" image_selected="PushButton_Selected" image_disabled="PushButton_Disabled" - image_disabled_selected="PushButton_Disabled_Selected" + image_disabled_selected="PushButton_Selected_Disabled" image_overlay="Combobox_Over" image_overlay_alignment="right" /> -- cgit v1.2.3 From 4b543b618b101aca9dee1f224d8dbd4fbf937d71 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 24 Jul 2024 15:05:08 -0400 Subject: Cache more frequently accessed settings --- indra/newview/llhudtext.cpp | 3 ++- indra/newview/llmeshrepository.cpp | 3 ++- indra/newview/lloutfitgallery.cpp | 3 ++- indra/newview/llphysicsmotion.cpp | 33 +++++++++++++++++---------------- indra/newview/lltoolpie.cpp | 3 ++- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 5ee0ab437d..78afe43ffe 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -392,7 +392,8 @@ void LLHUDText::updateVisibility() LLVector3 pos_agent_center = gAgent.getPosAgentFromGlobal(mPositionGlobal) - dir_from_camera; F32 last_distance_center = (pos_agent_center - LLViewerCamera::getInstance()->getOrigin()).magVec(); - F32 max_draw_distance = gSavedSettings.getF32("PrimTextMaxDrawDistance"); + static LLCachedControl prim_text_max_dist(gSavedSettings, "PrimTextMaxDrawDistance"); + F32 max_draw_distance = prim_text_max_dist; if(max_draw_distance < 0) { diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index c02a12e6b2..1c64ed6822 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -3743,7 +3743,8 @@ void LLMeshRepository::notifyLoadedMeshes() ? (2 * LLAppCoreHttp::PIPELINING_DEPTH) : 5); - LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("Mesh2MaxConcurrentRequests"); + static LLCachedControl mesh2_max_req(gSavedSettings, "Mesh2MaxConcurrentRequests"); + LLMeshRepoThread::sMaxConcurrentRequests = mesh2_max_req; LLMeshRepoThread::sRequestHighWater = llclamp(scale * S32(LLMeshRepoThread::sMaxConcurrentRequests), REQUEST2_HIGH_WATER_MIN, REQUEST2_HIGH_WATER_MAX); diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 96be917019..b1b9f69f4f 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -416,7 +416,8 @@ void LLOutfitGallery::updateRowsIfNeeded() bool compareGalleryItem(LLOutfitGalleryItem* item1, LLOutfitGalleryItem* item2) { - if(gSavedSettings.getBOOL("OutfitGallerySortByName") || + static LLCachedControl outfit_gallery_sort_by_name(gSavedSettings, "OutfitGallerySortByName"); + if(outfit_gallery_sort_by_name || ((item1->isDefaultImage() && item2->isDefaultImage()) || (!item1->isDefaultImage() && !item2->isDefaultImage()))) { std::string name1 = item1->getItemName(); diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 6782aa2123..86291708b0 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -454,25 +454,26 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, const bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; - // Skip if disabled globally. - if (!gSavedSettings.getBOOL("AvatarPhysics")) - { - return true; - } + // Skip if disabled globally. + static LLCachedControl av_physics(gSavedSettings, "AvatarPhysics"); + if (!av_physics) + { + return true; + } - bool update_visuals = false; - for (motion_vec_t::iterator iter = mMotions.begin(); - iter != mMotions.end(); - ++iter) - { - LLPhysicsMotion *motion = (*iter); - update_visuals |= motion->onUpdate(time); - } + bool update_visuals = false; + for (motion_vec_t::iterator iter = mMotions.begin(); + iter != mMotions.end(); + ++iter) + { + LLPhysicsMotion *motion = (*iter); + update_visuals |= motion->onUpdate(time); + } - if (update_visuals) - mCharacter->updateVisualParams(); + if (update_visuals) + mCharacter->updateVisualParams(); - return true; + return true; } // Return true if character has to update visual params. diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 531e657a1e..8cdc2e94f4 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1424,7 +1424,8 @@ void LLToolPie::handleDeselect() LLTool* LLToolPie::getOverrideTool(MASK mask) { - if (gSavedSettings.getBOOL("EnableGrab")) + static LLCachedControl enable_grab(gSavedSettings, "EnableGrab"); + if (enable_grab) { if (mask == DEFAULT_GRAB_MASK) { -- cgit v1.2.3