From dfb243cd953423e69afb0e9ea48efc9047226763 Mon Sep 17 00:00:00 2001 From: "Linden Staff@LINDEN-E5E9EA17.lindenlab.com" Date: Wed, 30 Mar 2011 16:20:59 -0700 Subject: SOCIAL-853 FIX As a new user, I would like Second Life to start up with a maximized window to fully immerse myself in the experience * Added virtual meetsRequirementsForMaximizedStart() function to determine whether or not to start the initial experience in a maximized window Reviewed by Richard --- indra/newview/llappviewer.cpp | 40 ++++++++++++++++++++++++++++++++-------- indra/newview/llappviewer.h | 1 + 2 files changed, 33 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f6fe7ecd01..c993acb283 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" @@ -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 diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 0226211735..61ee6a7cf1 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -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: -- cgit v1.2.3