From 9b4f54c826ffa4f94efa866068c9d6ecdfb4b424 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:48 -0500 Subject: Second Life viewer sources 1.13.2.15 --- linden/indra/newview/llfeaturemanager.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'linden/indra/newview/llfeaturemanager.cpp') diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp index d3b0dbb..061b343 100644 --- a/linden/indra/newview/llfeaturemanager.cpp +++ b/linden/indra/newview/llfeaturemanager.cpp @@ -300,12 +300,7 @@ BOOL LLFeatureManager::loadFeatureTables() return TRUE; } -S32 LLFeatureManager::getGPUClass() -{ - return mGPUClass; -} - -S32 LLFeatureManager::loadGPUClass() +void LLFeatureManager::loadGPUClass() { std::string data_path = gDirUtilp->getAppRODataDir(); @@ -313,6 +308,10 @@ S32 LLFeatureManager::loadGPUClass() data_path += GPU_TABLE_FILENAME; + // defaults + mGPUClass = 0; + mGPUString = gGLManager.getRawGLString(); + llifstream file; file.open(data_path.c_str()); @@ -320,7 +319,7 @@ S32 LLFeatureManager::loadGPUClass() if (!file) { llwarns << "Unable to open GPU table: " << data_path << "!" << llendl; - return 0; + return; } std::string renderer = gGLManager.getRawGLString(); @@ -379,14 +378,14 @@ S32 LLFeatureManager::loadGPUClass() { file.close(); llinfos << "GPU is " << label << llendl; - return (S32) strtol(cls, NULL, 10); + mGPUString = label; + mGPUClass = (S32) strtol(cls, NULL, 10); } } file.close(); //flp->dump(); llwarns << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << llendl; - return 0; } void LLFeatureManager::cleanupFeatureTables() @@ -419,7 +418,7 @@ void LLFeatureManager::initCPUFeatureMasks() void LLFeatureManager::initGraphicsFeatureMasks() { - mGPUClass = loadGPUClass(); + loadGPUClass(); if (mGPUClass >= 0 && mGPUClass < 4) { -- cgit v1.1