diff options
author | Richard Linden <none@none> | 2011-04-06 15:20:51 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-04-06 15:20:51 -0700 |
commit | 1d34e7b90bb9b45e20051d777da5d24dc76dbd50 (patch) | |
tree | 4028d274dd824485f7a97d36a48b92e7ff72b357 /indra/newview/llappviewer.cpp | |
parent | b5c834c6fdcee7d7238bebfc561ecee3ecca3589 (diff) | |
parent | 75ddf612ad29240d6d34b5044ae09e4295217766 (diff) |
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d96e376bc7..cbd996f909 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -78,7 +78,6 @@ #include "llvoicechannel.h" #include "llvoavatarself.h" #include "llsidetray.h" -#include "llfeaturemanager.h" #include "llurlmatch.h" #include "lltextutil.h" #include "lllogininstance.h" @@ -756,7 +755,7 @@ bool LLAppViewer::init() // // Various introspection concerning the libs we're using - particularly - // the libs involved in getting to a full login screen. + // the libs involved in getting to a full login screen. // LL_INFOS("InitInfo") << "J2C Engine is: " << LLImageJ2C::getEngineInfo() << LL_ENDL; LL_INFOS("InitInfo") << "libcurl version is: " << LLCurl::getVersionString() << LL_ENDL; @@ -2732,6 +2731,20 @@ void LLAppViewer::checkForCrash(void) } +// +// This function decides whether the client machine meets the minimum requirements to +// run in a maximized window, per the consensus of davep, boa and nyx on 3/30/2011. +// +bool LLAppViewer::meetsRequirementsForMaximizedStart() +{ + bool maximizedOk = (LLFeatureManager::getInstance()->getGPUClass() >= GPU_CLASS_2); + + const U32 one_gigabyte_kb = 1024 * 1024; + maximizedOk &= (gSysMemory.getPhysicalMemoryKB() >= one_gigabyte_kb); + + return maximizedOk; +} + bool LLAppViewer::initWindow() { LL_INFOS("AppInit") << "Initializing window..." << LL_ENDL; @@ -2751,7 +2764,8 @@ bool LLAppViewer::initWindow() const S32 NEVER_SUBMIT_REPORT = 2; bool use_watchdog = false; int watchdog_enabled_setting = gSavedSettings.getS32("WatchdogEnabled"); - if(watchdog_enabled_setting == -1){ + if(watchdog_enabled_setting == -1) + { use_watchdog = !LLFeatureManager::getInstance()->isFeatureAvailable("WatchdogDisabled"); } else @@ -2799,6 +2813,21 @@ bool LLAppViewer::initWindow() LLAppViewer::instance()->forceErrorLLError(); } + // + // Determine if the window should start maximized on initial run based + // on graphics capability + // + if (gSavedSettings.getBOOL("FirstLoginThisInstall") && meetsRequirementsForMaximizedStart()) + { + LL_INFOS("AppInit") << "This client met the requirements for a maximized initial screen." << LL_ENDL; + gSavedSettings.setBOOL("WindowMaximized", TRUE); + } + + if (gSavedSettings.getBOOL("WindowMaximized")) + { + gViewerWindow->mWindow->maximize(); + } + LLUI::sWindow = gViewerWindow->getWindow(); // Show watch cursor |