summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2011-04-14 18:27:31 +0000
committerDon Kjer <don@lindenlab.com>2011-04-14 18:27:31 +0000
commit01f4570c795b197e74bfa96139631c43df8d0664 (patch)
tree7c1952cc51adec21025f537281e59f828e75224d /indra/newview/llappviewer.cpp
parent2bf967149626672584b17b53fb5d2e6186f3d896 (diff)
parent88a7262340f2fc5085f4ac6600790518d01292d6 (diff)
Merge with viewer-development
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp35
1 files changed, 32 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index d52be56929..90c9912d1d 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;
@@ -2733,6 +2732,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;
@@ -2752,7 +2765,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
@@ -2800,6 +2814,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