diff options
| author | Erik Kundiman <erik@megapahit.org> | 2025-09-29 16:29:19 +0800 | 
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2025-10-01 16:56:56 +0800 | 
| commit | a954d290674db08ecaf3c1e6484a0cb6647b88b5 (patch) | |
| tree | 3b672bac3e7d6807cd485ad5f041f69a5c729f46 /indra/newview/llviewerwindow.cpp | |
| parent | e6eaa7e29990431b5207dbb4f8ae5560cf884acb (diff) | |
| parent | a6d4c1d394eef2cea41f6c6bcd751fec746ec17d (diff) | |
Merge tag 'Second_Life_Release#a6d4c1d3-2025.07' into 2025.07
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 22 | 
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 47fb658d15..9942ea3de8 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"); @@ -784,8 +781,16 @@ public:              addText(xpos, ypos, "Projection Matrix");              ypos += y_inc; +#if LL_DARWIN +// For sprintf deprecation +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif              // View last column is always <0,0,0,1>              MATRIX_ROW_F32_TO_STR(gGLModelView, 12,camera_lines[3]); addText(xpos, ypos, std::string(camera_lines[3])); ypos += y_inc; +#if LL_DARWIN +#pragma clang diagnostic pop +#endif              MATRIX_ROW_N32_TO_STR(gGLModelView,  8,camera_lines[2]); addText(xpos, ypos, std::string(camera_lines[2])); ypos += y_inc;              MATRIX_ROW_N32_TO_STR(gGLModelView,  4,camera_lines[1]); addText(xpos, ypos, std::string(camera_lines[1])); ypos += y_inc; mBackRectCamera2.mTop = ypos + 2;              MATRIX_ROW_N32_TO_STR(gGLModelView,  0,camera_lines[0]); addText(xpos, ypos, std::string(camera_lines[0])); ypos += y_inc; @@ -2036,6 +2041,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)  std::string LLViewerWindow::getLastSnapshotDir()  { +    static LLCachedControl<std::string> sSnapshotDir(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseDir", ""));      return sSnapshotDir;  } @@ -4746,6 +4752,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. @@ -4800,7 +4807,7 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save  // Check if there is enough free space to save snapshot  #ifdef LL_WINDOWS -    boost::filesystem::path b_path(utf8str_to_utf16str(lastSnapshotDir)); +    boost::filesystem::path b_path(ll_convert<std::wstring>(lastSnapshotDir));  #else      boost::filesystem::path b_path(lastSnapshotDir);  #endif @@ -4844,6 +4851,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; @@ -4959,8 +4969,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  | 
