summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterperformance.cpp10
-rw-r--r--indra/newview/llfloaterperformance.h1
-rw-r--r--indra/newview/llfloaterpreference.cpp6
-rw-r--r--indra/newview/llfloaterpreference.h2
-rw-r--r--indra/newview/skins/default/xui/en/panel_performance_preferences.xml25
5 files changed, 36 insertions, 8 deletions
diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp
index 36912971d9..88319b170f 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 09bcd18bb5..6a72f3d7c5 100644
--- a/indra/newview/llfloaterperformance.h
+++ b/indra/newview/llfloaterperformance.h
@@ -61,6 +61,7 @@ private:
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 76633a46a9..bb4ddf5969 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 d5d0aca939..32a55a2948 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -199,6 +199,8 @@ public:
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 9c1a3ebd9e..b52c19d5e3 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"