summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRye <rye@lindenlab.com>2024-10-29 20:24:40 -0700
committerRye <rye@lindenlab.com>2024-10-30 22:08:05 -0700
commitd1a4cbb8fa9058c4d3a8fc3ebe3a543626aac77e (patch)
tree8cf7a4b8b513f7819afb6e86dfe06ea951fa0df1 /indra
parent2039009f6c5aac15e85a41bd35ad38763d25ad5f (diff)
Fixes to LLCachedControl usage in windowing and avatars
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewerwindow.cpp14
-rw-r--r--indra/newview/llvoavatar.cpp4
-rw-r--r--indra/newview/llvoavatar.h2
3 files changed, 10 insertions, 10 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index cc3e916270..d339d0c37c 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -268,9 +268,6 @@ static const F32 MIN_DISPLAY_SCALE = 0.75f;
static const char KEY_MOUSELOOK = 'M';
-static LLCachedControl<std::string> sSnapshotBaseName(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot"));
-static LLCachedControl<std::string> sSnapshotDir(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseDir", ""));
-
LLTrace::SampleStatHandle<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity");
@@ -2012,6 +2009,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
std::string LLViewerWindow::getLastSnapshotDir()
{
+ static LLCachedControl<std::string> sSnapshotDir(gSavedPerAccountSettings, "SnapshotBaseDir", "");
return sSnapshotDir;
}
@@ -3782,7 +3780,7 @@ void LLViewerWindow::updateLayout()
{
LLToolMgr* tool_mgr = LLToolMgr::getInstance();
LLTool* tool = tool_mgr->getCurrentTool();
- LLCachedControl<bool> freeze_time(gSavedSettings, "FreezeTime");
+ static LLCachedControl<bool> freeze_time(gSavedSettings, "FreezeTime");
if (gFloaterTools != NULL
&& tool != NULL
&& tool != gToolNull
@@ -4711,6 +4709,7 @@ void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke
// Get a base file location if needed.
if (force_picker || !isSnapshotLocSet())
{
+ static LLCachedControl<std::string> sSnapshotBaseName(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot");
std::string proposed_name(sSnapshotBaseName);
// getSaveFile will append an appropriate extension to the proposed name, based on the ESaveFilter constant passed in.
@@ -4756,6 +4755,9 @@ void LLViewerWindow::onSelectionFailure(const snapshot_saved_signal_t::slot_type
void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb)
{
+ static LLCachedControl<std::string> sSnapshotBaseName(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot");
+ static LLCachedControl<std::string> sSnapshotDir(gSavedPerAccountSettings, "SnapshotBaseDir", "");
+
std::string lastSnapshotDir = LLViewerWindow::getLastSnapshotDir();
if (lastSnapshotDir.empty())
{
@@ -4907,8 +4909,8 @@ void LLViewerWindow::playSnapshotAnimAndSound()
bool LLViewerWindow::isSnapshotLocSet() const
{
- std::string snapshot_dir = sSnapshotDir;
- return !snapshot_dir.empty();
+ static LLCachedControl<std::string> sSnapshotDir(gSavedPerAccountSettings, "SnapshotBaseDir", "");
+ return !sSnapshotDir().empty();
}
void LLViewerWindow::resetSnapshotLoc() const
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 690cfaa677..bfed8b9d39 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -687,7 +687,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),
mLoadedCallbacksPaused(false),
mLoadedCallbackTextures(0),
- mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar", false)),
mLastRezzedStatus(-1),
mIsEditingAppearance(false),
mUseLocalAppearance(false),
@@ -8523,7 +8522,8 @@ bool LLVOAvatar::processFullyLoadedChange(bool loading)
bool LLVOAvatar::isFullyLoaded() const
{
- return (mRenderUnloadedAvatar || mFullyLoaded);
+ static LLCachedControl<bool> render_unloaded_avatars(gSavedSettings, "RenderUnloadedAvatar", false);
+ return (render_unloaded_avatars || mFullyLoaded);
}
bool LLVOAvatar::isTooComplex() const
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index dd1725c322..557ccddf99 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -668,8 +668,6 @@ private:
LLVector3 mLastAnimExtents[2];
LLVector3 mLastAnimBasePos;
- LLCachedControl<bool> mRenderUnloadedAvatar;
-
//--------------------------------------------------------------------
// Wind rippling in clothes
//--------------------------------------------------------------------