diff options
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rw-r--r--[-rwxr-xr-x] | indra/newview/llfeaturemanager.cpp | 59 |
1 files changed, 22 insertions, 37 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index ea604709aa..7f1c981a3c 100755..100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -66,12 +66,9 @@ const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_mac.%s.txt"; #elif LL_LINUX const char FEATURE_TABLE_FILENAME[] = "featuretable_linux.txt"; const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_linux.%s.txt"; -#elif LL_SOLARIS -const char FEATURE_TABLE_FILENAME[] = "featuretable_solaris.txt"; -const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_solaris.%s.txt"; #else -const char FEATURE_TABLE_FILENAME[] = "featuretable%s.txt"; -const char FEATURE_TABLE_VER_FILENAME[] = "featuretable%s.%s.txt"; +const char FEATURE_TABLE_FILENAME[] = "featuretable.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable.%s.txt"; #endif #if 0 // consuming code in #if 0 below @@ -98,6 +95,10 @@ void LLFeatureList::addFeature(const std::string& name, const BOOL available, co } LLFeatureInfo fi(name, available, level); + LL_DEBUGS_ONCE("RenderInit") << "Feature '" << name << "' " + << (available ? "" : "not " ) << "available" + << " at " << level + << LL_ENDL; mFeatures[name] = fi; } @@ -119,6 +120,7 @@ F32 LLFeatureList::getRecommendedValue(const std::string& name) { if (mFeatures.count(name) && isFeatureAvailable(name)) { + LL_DEBUGS_ONCE("RenderInit") << "Setting '" << name << "' to recommended value " << mFeatures[name].mRecommendedLevel << LL_ENDL; return mFeatures[name].mRecommendedLevel; } @@ -128,7 +130,7 @@ F32 LLFeatureList::getRecommendedValue(const std::string& name) BOOL LLFeatureList::maskList(LLFeatureList &mask) { - //LL_INFOS() << "Masking with " << mask.mName << LL_ENDL; + LL_DEBUGS_ONCE() << "Masking with " << mask.mName << LL_ENDL; // // Lookup the specified feature mask, and overlay it on top of the // current feature mask. @@ -175,16 +177,14 @@ BOOL LLFeatureList::maskList(LLFeatureList &mask) void LLFeatureList::dump() { LL_DEBUGS("RenderInit") << "Feature list: " << mName << LL_ENDL; - LL_DEBUGS("RenderInit") << "--------------" << LL_ENDL; LLFeatureInfo fi; feature_map_t::iterator feature_it; for (feature_it = mFeatures.begin(); feature_it != mFeatures.end(); ++feature_it) { fi = feature_it->second; - LL_DEBUGS("RenderInit") << fi.mName << "\t\t" << fi.mAvailable << ":" << fi.mRecommendedLevel << LL_ENDL; + LL_DEBUGS("RenderInit") << "With " << mName << " feature " << fi.mName << " " << fi.mAvailable << ":" << fi.mRecommendedLevel << LL_ENDL; } - LL_DEBUGS("RenderInit") << LL_ENDL; } static const std::vector<std::string> sGraphicsLevelNames = boost::assign::list_of @@ -274,27 +274,12 @@ bool LLFeatureManager::loadFeatureTables() std::string filename; std::string http_filename; -#if LL_WINDOWS - std::string os_string = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); - if (os_string.find("Microsoft Windows XP") == 0) - { - filename = llformat(FEATURE_TABLE_FILENAME, "_xp"); - http_filename = llformat(FEATURE_TABLE_VER_FILENAME, "_xp", LLVersionInfo::getVersion().c_str()); - } - else - { - filename = llformat(FEATURE_TABLE_FILENAME, ""); - http_filename = llformat(FEATURE_TABLE_VER_FILENAME, "", LLVersionInfo::getVersion().c_str()); - } -#else filename = FEATURE_TABLE_FILENAME; http_filename = llformat(FEATURE_TABLE_VER_FILENAME, LLVersionInfo::getVersion().c_str()); -#endif app_path += filename; - - // second table is downloaded with HTTP + // second table is downloaded with HTTP - note that this will only be used on the run _after_ it is downloaded std::string http_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, http_filename); // use HTTP table if it exists @@ -378,11 +363,11 @@ bool LLFeatureManager::parseFeatureTable(std::string filename) file >> name; if (!mMaskList.count(name)) { - flp = new LLFeatureList(name); - mMaskList[name] = flp; - } - else - { + flp = new LLFeatureList(name); + mMaskList[name] = flp; + } + else + { LL_WARNS("RenderInit") << "Overriding mask " << name << ", this is invalid!" << LL_ENDL; parse_ok = false; } @@ -391,11 +376,11 @@ bool LLFeatureManager::parseFeatureTable(std::string filename) { if (flp) { - S32 available; - F32 recommended; - file >> available >> recommended; - flp->addFeature(name, available, recommended); - } + S32 available; + F32 recommended; + file >> available >> recommended; + flp->addFeature(name, available, recommended); + } else { LL_WARNS("RenderInit") << "Specified parameter before <list> keyword!" << LL_ENDL; @@ -579,7 +564,7 @@ void LLFeatureManager::applyRecommendedSettings() // cap the level at 2 (high) U32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5)); - LL_INFOS() << "Applying Recommended Features" << LL_ENDL; + LL_INFOS("RenderInit") << "Applying Recommended Features for level " << level << LL_ENDL; setGraphicsLevel(level, false); gSavedSettings.setU32("RenderQualityPerformance", level); @@ -786,7 +771,7 @@ void LLFeatureManager::applyBaseMasks() if (osInfo.mMajorVer == 10 && osInfo.mMinorVer < 7) { maskFeatures("OSX_10_6_8"); - } + } #endif // now mask by gpu string |