From 6c418060c183a40c9e7f56d1fcf81ac8308091a2 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 16 Jan 2023 19:12:42 +0200 Subject: SL-18979 FIXED "Reset to recommended settings" should reset Maximum render time of Avatars nearby --- indra/newview/llfloaterpreference.cpp | 24 +++++++++++++++++++++++- indra/newview/llfloaterpreference.h | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'indra') 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& names) { LLView* view = findChild("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: -- cgit v1.2.3