From 26a7de79c785bf440f3e76bd72e84740b3af1534 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Fri, 8 Mar 2019 13:49:51 -0500 Subject: [PATCH] [PPE] Preset overrides go in user settings now --- indra/llrender/llpostprocess.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp index bc949436e..6e58c59c7 100644 --- a/indra/llrender/llpostprocess.cpp +++ b/indra/llrender/llpostprocess.cpp @@ -355,17 +355,19 @@ LLPostProcess::LLPostProcess(void) : mShaders.push_back(new LLPosterizeShader()); /* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender.*/ - std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME)); - LL_DEBUGS("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL; - - llifstream effectsXML(pathName); - - if (effectsXML) + auto load_effects = [&](const std::string& pathName) { - LLPointer parser = new LLSDXMLParser(); + LL_DEBUGS("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL; + llifstream effectsXML(pathName); - parser->parse(effectsXML, mAllEffectInfo, LLSDSerialize::SIZE_UNLIMITED); - } + if (effectsXML) + { + LLPointer parser = new LLSDXMLParser(); + parser->parse(effectsXML, mAllEffectInfo, LLSDSerialize::SIZE_UNLIMITED); + } + }; + load_effects(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME)); + load_effects(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "windlight", XML_FILENAME)); // Singu TODO: Make this configurable via settings if (!mAllEffectInfo.has("Default")) @@ -705,7 +707,7 @@ void LLPostProcess::saveEffectAs(std::string const & effectName) mAllEffectInfo[effectName] = mSelectedEffectInfo; mSelectedEffectChanged(mSelectedEffectName); // Might've changed, either way update the lists - std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME)); + std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "windlight", XML_FILENAME)); //LL_INFOS() << "Saving PostProcess Effects settings to " << pathName << LL_ENDL; llofstream effectsXML(pathName);