meow-7.2.2
Linden Staff@LINDEN-E5E9EA17.lindenlab.com 2011-03-30 16:28:41 -07:00
commit 3fc293b73b
2 changed files with 33 additions and 8 deletions

View File

@ -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"
@ -755,7 +754,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;
@ -2731,6 +2730,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;
@ -2750,7 +2763,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
@ -2767,11 +2781,6 @@ bool LLAppViewer::initWindow()
LLNotificationsUI::LLNotificationManager::getInstance();
if (gSavedSettings.getBOOL("WindowMaximized"))
{
gViewerWindow->mWindow->maximize();
}
if (!gNoRender)
{
//
@ -2801,6 +2810,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

View File

@ -187,6 +187,7 @@ protected:
virtual std::string generateSerialNumber() = 0; // Platforms specific classes generate this.
virtual bool meetsRequirementsForMaximizedStart(); // Used on first login to decide to launch maximized
private: