summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-01-16 19:12:42 +0200
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-01-16 19:12:42 +0200
commit6c418060c183a40c9e7f56d1fcf81ac8308091a2 (patch)
treecf362f59172154202017930ba9ba434f0bef0f58 /indra/newview
parent1ecb7186fb33e8cf2d9598e5c3c3d0a8041ab1d2 (diff)
SL-18979 FIXED "Reset to recommended settings" should reset Maximum render time of Avatars nearby
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterpreference.cpp24
-rw-r--r--indra/newview/llfloaterpreference.h1
2 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index bb4ddf5969..531270f936 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -793,7 +793,8 @@ void LLFloaterPreference::setHardwareDefaults()
void LLFloaterPreference::setRecommendedSettings()
{
- gSavedSettings.setBOOL("AutoTuneFPS", FALSE);
+ resetAutotuneSettings();
+ gSavedSettings.getControl("RenderVSyncEnable")->resetToDefault(true);
LLFeatureManager::getInstance()->applyRecommendedSettings();
@@ -818,6 +819,27 @@ void LLFloaterPreference::setRecommendedSettings()
}
}
+void LLFloaterPreference::resetAutotuneSettings()
+{
+ gSavedSettings.setBOOL("AutoTuneFPS", FALSE);
+
+ const std::string autotune_settings[] = {
+ "AutoTuneLock",
+ "TargetFPS",
+ "TuningFPSStrategy",
+ "AutoTuneImpostorByDistEnabled",
+ "AutoTuneImpostorFarAwayDistance" ,
+ "AutoTuneRenderFarClipMin",
+ "AutoTuneRenderFarClipTarget",
+ "RenderAvatarMaxART"
+ };
+
+ for (auto it : autotune_settings)
+ {
+ gSavedSettings.getControl(it)->resetToDefault(true);
+ }
+}
+
void LLFloaterPreference::getControlNames(std::vector<std::string>& names)
{
LLView* view = findChild<LLView>("display");
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 32a55a2948..2aa6ca87b7 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -200,6 +200,7 @@ public:
void saveGraphicsPreset(std::string& preset);
void setRecommendedSettings();
+ void resetAutotuneSettings();
private: