summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2013-08-02 10:50:19 -0400
committerNat Goodspeed <nat@lindenlab.com>2013-08-02 10:50:19 -0400
commit32a953f65eae51850bad1b2c4c2a63d3dff12a68 (patch)
treebe3ff63fb71d3323d769e846bbe0bc3811dd2152 /indra/newview/llappviewer.cpp
parentd8565b05a5ccc9df8522db1d0fb32c320fa975b9 (diff)
CHOP-959: Honor --graphicslevel switch even on first viewer run.
Previous CHOP-959 logic set a flag to remember that settings variable RenderQualityPerformance was set (by --graphicslevel), so it could be applied once LLViewerWindow is constructed. But on first viewer run, LLViewerWindow constructor calls LLFeatureManager::applyRecommendedSettings(), which resets that settings variable! So don't just set a flag, actually capture the requested RenderQualityPerformance value for later.
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rwxr-xr-xindra/newview/llappviewer.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 37f1f11451..6132e9b466 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -668,7 +668,6 @@ LLAppViewer::LLAppViewer() :
mSecondInstance(false),
mSavedFinalSnapshot(false),
mSavePerAccountSettings(false), // don't save settings on logout unless login succeeded.
- mForceGraphicsDetail(false),
mQuitRequested(false),
mLogoutRequestSent(false),
mYieldTime(-1),
@@ -2563,11 +2562,19 @@ bool LLAppViewer::initConfiguration()
if (clp.hasOption("graphicslevel"))
{
- // User explicitly requested --graphicslevel on the command line.
- // We expect this switch has already set RenderQualityPerformance.
- // Check that value for validity; if valid, we'll engage it later.
- mForceGraphicsDetail =
- LLFeatureManager::instance().isValidGraphicsLevel(gSavedSettings.getU32("RenderQualityPerformance"));
+ // User explicitly requested --graphicslevel on the command line. We
+ // expect this switch has already set RenderQualityPerformance. Check
+ // that value for validity.
+ U32 graphicslevel = gSavedSettings.getU32("RenderQualityPerformance");
+ if (LLFeatureManager::instance().isValidGraphicsLevel(graphicslevel))
+ {
+ // graphicslevel is valid: save it and engage it later. Capture
+ // the requested value separately from the settings variable
+ // because, if this is the first run, LLViewerWindow's constructor
+ // will call LLFeatureManager::applyRecommendedSettings(), which
+ // overwrites this settings variable!
+ mForceGraphicsLevel = graphicslevel;
+ }
}
LLFastTimerView::sAnalyzePerformance = gSavedSettings.getBOOL("AnalyzePerformance");
@@ -3125,11 +3132,12 @@ bool LLAppViewer::initWindow()
// Initialize GL stuff
//
- if (mForceGraphicsDetail)
+ if (mForceGraphicsLevel)
{
- LLFeatureManager::getInstance()->setGraphicsLevel(gSavedSettings.getU32("RenderQualityPerformance"), false);
+ LLFeatureManager::getInstance()->setGraphicsLevel(*mForceGraphicsLevel, false);
+ gSavedSettings.setU32("RenderQualityPerformance", *mForceGraphicsLevel);
}
-
+
// Set this flag in case we crash while initializing GL
gSavedSettings.setBOOL("RenderInitError", TRUE);
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );