diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp index 36912971d9e0c6042e2383f05d38c94a198829d5..88319b170fb6aba3e821fbe28cc04ad20e4dff72 100644 --- a/indra/newview/llfloaterperformance.cpp +++ b/indra/newview/llfloaterperformance.cpp @@ -127,6 +127,7 @@ BOOL LLFloaterPerformance::postBuild() mObjectList->setIconClickedCallback(boost::bind(&LLFloaterPerformance::detachItem, this, _1)); mSettingsPanel->getChild<LLButton>("advanced_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickAdvanced, this)); + mSettingsPanel->getChild<LLButton>("defaults_btn")->setCommitCallback(boost::bind(&LLFloaterPerformance::onClickDefaults, this)); mSettingsPanel->getChild<LLRadioGroup>("graphics_quality")->setCommitCallback(boost::bind(&LLFloaterPerformance::onChangeQuality, this, _2)); mSettingsPanel->getChild<LLCheckBoxCtrl>("advanced_lighting_model")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::onClickAdvancedLighting, this)); mSettingsPanel->getChild<LLComboBox>("ShadowDetail")->setMouseDownCallback(boost::bind(&LLFloaterPerformance::onClickShadows, this)); @@ -477,6 +478,15 @@ void LLFloaterPerformance::onClickAdvanced() LLFloaterReg::showInstance("prefs_graphics_advanced"); } +void LLFloaterPerformance::onClickDefaults() +{ + LLFloaterPreference* instance = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences"); + if (instance) + { + instance->setRecommendedSettings(); + } +} + void LLFloaterPerformance::onChangeQuality(const LLSD& data) { LLFloaterPreference* instance = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences"); diff --git a/indra/newview/llfloaterperformance.h b/indra/newview/llfloaterperformance.h index 09bcd18bb581857d1896a3abcb5df26b3dc1d237..6a72f3d7c52a34f39be7da2409f5d8e83b605796 100644 --- a/indra/newview/llfloaterperformance.h +++ b/indra/newview/llfloaterperformance.h @@ -61,6 +61,7 @@ class LLFloaterPerformance : public LLFloater void setFPSText(); void onClickAdvanced(); + void onClickDefaults(); void onChangeQuality(const LLSD& data); void onClickHideAvatars(); void onClickExceptions(); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 76633a46a941b7bc9d4fe2a034316f3b90403572..bb4ddf596903ebe42325536fea1385310949e38a 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -788,6 +788,12 @@ void LLFloaterPreference::setHardwareDefaults() saveGraphicsPreset(preset_graphic_active); saveSettings(); // save here to be able to return to the previous preset by Cancel } + setRecommendedSettings(); +} + +void LLFloaterPreference::setRecommendedSettings() +{ + gSavedSettings.setBOOL("AutoTuneFPS", FALSE); LLFeatureManager::getInstance()->applyRecommendedSettings(); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index d5d0aca93988b777ea6ced3ae11361a75a82be4d..32a55a2948fe988eb8422de8af0754a5526717c9 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -199,6 +199,8 @@ class LLFloaterPreference : public LLFloater, public LLAvatarPropertiesObserver, void saveCameraPreset(std::string& preset); void saveGraphicsPreset(std::string& preset); + void setRecommendedSettings(); + private: void onDeleteTranscripts(); diff --git a/indra/newview/skins/default/xui/en/panel_performance_preferences.xml b/indra/newview/skins/default/xui/en/panel_performance_preferences.xml index 9c1a3ebd9ee36fe2097dbca5420ea87c9abb5f4d..b52c19d5e3dfa34e8f7dbf8b30421431c530ae0e 100644 --- a/indra/newview/skins/default/xui/en/panel_performance_preferences.xml +++ b/indra/newview/skins/default/xui/en/panel_performance_preferences.xml @@ -47,14 +47,23 @@ Graphics settings </text> <button - follows="top|left" - height="23" - label="Open Advanced Settings" - layout="topleft" - left="360" - name="advanced_btn" - top_delta="0" - width="200"/> + follows="top|left" + height="23" + label="Open Advanced Settings" + layout="topleft" + left="360" + name="advanced_btn" + top_delta="-35" + width="200"/> + <button + follows="top|left" + height="23" + label="Reset to recommended settings" + layout="topleft" + left="350" + name="defaults_btn" + top_pad="10" + width="210"/> <view_border bevel_style="in" height="0"