summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-03-29 05:54:27 +0800
committerErik Kundiman <erik@megapahit.org>2025-03-29 05:54:27 +0800
commit884cf68fee88c2ea58703e261bc303f5613a6c5b (patch)
treebeff203c53d389193432efa1d187e9f5fa6086a2 /indra/newview/llviewerwindow.cpp
parentf6f22cf804c3bb0192c3215c05a89e78288c4d7c (diff)
parent6ac1d4f3e37f2118875a4c9e96b26e3f82e17a1e (diff)
Merge tag 'Second_Life_Release#6ac1d4f3-2025.03' into 2025.03
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 9214350aad..7268764f64 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -489,7 +489,8 @@ public:
clearText();
- if (gSavedSettings.getBOOL("DebugShowTime"))
+ static LLCachedControl<bool> debug_show_time(gSavedSettings, "DebugShowTime", false);
+ if (debug_show_time())
{
F32 time = gFrameTimeSeconds;
S32 hours = (S32)(time / (60*60));
@@ -498,7 +499,8 @@ public:
addText(xpos, ypos, llformat("Time: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc;
}
- if (gSavedSettings.getBOOL("DebugShowMemory"))
+ static LLCachedControl<bool> debug_show_memory(gSavedSettings, "DebugShowMemory", false);
+ if (debug_show_memory())
{
addText(xpos, ypos,
STRINGIZE("Memory: " << (LLMemory::getCurrentRSS() / 1024) << " (KB)"));
@@ -591,7 +593,8 @@ public:
ypos += y_inc;
}*/
- if (gSavedSettings.getBOOL("DebugShowRenderInfo"))
+ static LLCachedControl<bool> debug_show_render_info(gSavedSettings, "DebugShowRenderInfo", false);
+ if (debug_show_render_info())
{
LLTrace::Recording& last_frame_recording = LLTrace::get_frame_recording().getLastRecording();
@@ -730,7 +733,8 @@ public:
gPipeline.mNumVisibleNodes = LLPipeline::sVisibleLightCount = 0;
}
- if (gSavedSettings.getBOOL("DebugShowAvatarRenderInfo"))
+ static LLCachedControl<bool> debug_show_avatar_render_info(gSavedSettings, "DebugShowAvatarRenderInfo", false);
+ if (debug_show_avatar_render_info())
{
std::map<std::string, LLVOAvatar*> sorted_avs;
{
@@ -763,7 +767,8 @@ public:
av_iter++;
}
}
- if (gSavedSettings.getBOOL("DebugShowRenderMatrices"))
+ static LLCachedControl<bool> debug_show_render_matrices(gSavedSettings, "DebugShowRenderMatrices", false);
+ if (debug_show_render_matrices())
{
char camera_lines[8][32];
memset(camera_lines, ' ', sizeof(camera_lines));
@@ -789,7 +794,8 @@ public:
ypos += y_inc;
}
// disable use of glReadPixels which messes up nVidia nSight graphics debugging
- if (gSavedSettings.getBOOL("DebugShowColor") && !LLRender::sNsightDebugSupport)
+ static LLCachedControl<bool> debug_show_color(gSavedSettings, "DebugShowColor", false);
+ if (debug_show_color() && !LLRender::sNsightDebugSupport)
{
U8 color[4];
LLCoordGL coord = gViewerWindow->getCurrentMouse();
@@ -881,7 +887,8 @@ public:
}
}
- if (gSavedSettings.getBOOL("DebugShowTextureInfo"))
+ static LLCachedControl<bool> debug_show_texture_info(gSavedSettings, "DebugShowTextureInfo", false);
+ if (debug_show_texture_info())
{
LLViewerObject* objectp = NULL ;
@@ -1600,7 +1607,8 @@ bool LLViewerWindow::handleActivate(LLWindow *window, bool activated)
mActive = false;
// if the user has chosen to go Away automatically after some time, then go Away when minimizing
- if (gSavedSettings.getS32("AFKTimeout"))
+ static LLCachedControl<S32> afk_time(gSavedSettings, "AFKTimeout", 300);
+ if (afk_time())
{
gAgent.setAFK();
}