summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-09-11 20:54:32 -0400
committerGitHub <noreply@github.com>2025-09-11 20:54:32 -0400
commit452c8e0ea40da1de684c80b84ffa9ec712f72ed2 (patch)
treeaccf55819ba27731baeedf76471f667eb57b6de5 /indra/newview/llviewerwindow.cpp
parent3ab18e8545810483685f3d2cd4f091f178d772bb (diff)
Follow up fixes for Apple Silicon (#4662)
* Remove GLM sse flag from cmake that was moved to llpreprocessor.h * Further reduce performance loss of HDR and Sharpening on bandwith-constrained gpu by combining gamma correction into tonemap/sharpening shader passes * Update SSE2NEON to 1.8.0 to fix random render nans * Fix occasional startup crash from LLCachedControl being declared in global scope
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 70498ecab4..8abced7e8f 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -261,9 +261,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");
@@ -2042,6 +2039,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
std::string LLViewerWindow::getLastSnapshotDir()
{
+ static LLCachedControl<std::string> sSnapshotDir(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseDir", ""));
return sSnapshotDir;
}
@@ -4752,6 +4750,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(LLCachedControl<std::string>(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.
@@ -4850,6 +4849,9 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
// Shouldn't there be a return here?
}
+ static LLCachedControl<std::string> sSnapshotBaseName(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot"));
+ static LLCachedControl<std::string> sSnapshotDir(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseDir", ""));
+
// Look for an unused file name
auto is_snapshot_name_loc_set = isSnapshotLocSet();
std::string filepath;
@@ -4957,8 +4959,8 @@ void LLViewerWindow::playSnapshotAnimAndSound()
bool LLViewerWindow::isSnapshotLocSet() const
{
- std::string snapshot_dir = sSnapshotDir;
- return !snapshot_dir.empty();
+ static LLCachedControl<std::string> sSnapshotDir(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseDir", ""));
+ return !sSnapshotDir().empty();
}
void LLViewerWindow::resetSnapshotLoc() const