summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-08-03 11:57:51 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-08-03 11:57:51 -0400
commitfdb2ae8335f136283910f9538e74724b69886e15 (patch)
tree79ed0377590b5d291a301d3ae138145d4cb4608e /indra/newview/llappviewer.cpp
parent1d5490e752deeff316658f4850aac5fc96a91866 (diff)
parentb8bac66a0f8c392a221ad2c64611e2a55de82339 (diff)
Merge of viewer-development (3.4.1).
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp44
1 files changed, 41 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f8ee1a477f..77ec74d318 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -89,11 +89,13 @@
#include "lllogininstance.h"
#include "llprogressview.h"
#include "llvocache.h"
+#include "llvopartgroup.h"
#include "llweb.h"
#include "llsecondlifeurls.h"
#include "llupdaterservice.h"
#include "llcallfloater.h"
#include "llfloatertexturefetchdebugger.h"
+#include "llspellcheck.h"
// Linden library includes
#include "llavatarnamecache.h"
@@ -107,6 +109,7 @@
#include "llvfsthread.h"
#include "llvolumemgr.h"
#include "llxfermanager.h"
+#include "llphysicsextensions.h"
#include "llnotificationmanager.h"
#include "llnotifications.h"
@@ -117,6 +120,7 @@
// Third party library includes
#include <boost/bind.hpp>
#include <boost/foreach.hpp>
+#include <boost/algorithm/string.hpp>
@@ -626,6 +630,7 @@ LLAppViewer::LLAppViewer() :
mPurgeOnExit(false),
mSecondInstance(false),
mSavedFinalSnapshot(false),
+ mSavePerAccountSettings(false), // don't save settings on logout unless login succeeded.
mForceGraphicsDetail(false),
mQuitRequested(false),
mLogoutRequestSent(false),
@@ -676,6 +681,9 @@ bool LLAppViewer::init()
// initialize SSE options
LLVector4a::initClass();
+ //initialize particle index pool
+ LLVOPartGroup::initClass();
+
// Need to do this initialization before we do anything else, since anything
// that touches files should really go through the lldir API
gDirUtilp->initAppDirs("SecondLife");
@@ -1167,6 +1175,8 @@ void LLAppViewer::checkMemory()
static LLFastTimer::DeclareTimer FTM_MESSAGES("System Messages");
static LLFastTimer::DeclareTimer FTM_SLEEP("Sleep");
+static LLFastTimer::DeclareTimer FTM_YIELD("Yield");
+
static LLFastTimer::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache");
static LLFastTimer::DeclareTimer FTM_DECODE("Image Decode");
static LLFastTimer::DeclareTimer FTM_VFS("VFS Thread");
@@ -1352,6 +1362,7 @@ bool LLAppViewer::mainLoop()
// yield some time to the os based on command line option
if(mYieldTime >= 0)
{
+ LLFastTimer t(FTM_YIELD);
ms_sleep(mYieldTime);
}
@@ -1607,6 +1618,9 @@ bool LLAppViewer::cleanup()
// shut down mesh streamer
gMeshRepo.shutdown();
+ // shut down Havok
+ LLPhysicsExtensions::quitSystem();
+
// Must clean up texture references before viewer window is destroyed.
if(LLHUDManager::instanceExists())
{
@@ -1801,6 +1815,13 @@ bool LLAppViewer::cleanup()
{
llinfos << "Not saving per-account settings; don't know the account name yet." << llendl;
}
+ // Only save per account settings if the previous login succeeded, otherwise
+ // we might end up with a cleared out settings file in case a previous login
+ // failed after loading per account settings.
+ else if (!mSavePerAccountSettings)
+ {
+ llinfos << "Not saving per-account settings; last login was not successful." << llendl;
+ }
else
{
gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE);
@@ -2559,6 +2580,19 @@ bool LLAppViewer::initConfiguration()
//gDirUtilp->setSkinFolder("default");
}
+ if (gSavedSettings.getBOOL("SpellCheck"))
+ {
+ std::list<std::string> dict_list;
+ std::string dict_setting = gSavedSettings.getString("SpellCheckDictionary");
+ boost::split(dict_list, dict_setting, boost::is_any_of(std::string(",")));
+ if (!dict_list.empty())
+ {
+ LLSpellChecker::setUseSpellCheck(dict_list.front());
+ dict_list.pop_front();
+ LLSpellChecker::instance().setSecondaryDictionaries(dict_list);
+ }
+ }
+
mYieldTime = gSavedSettings.getS32("YieldTime");
// Read skin/branding settings if specified.
@@ -3084,8 +3118,8 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple();
// The user is not logged on yet, but record the current grid choice login url
- // which may have been the intended grid. This can b
- gDebugInfo["GridName"] = LLGridManager::getInstance()->getGridLabel();
+ // which may have been the intended grid.
+ gDebugInfo["GridName"] = LLGridManager::getInstance()->getGridId();
// *FIX:Mani - move this down in llappviewerwin32
#ifdef LL_WINDOWS
@@ -5018,6 +5052,10 @@ void LLAppViewer::handleLoginComplete()
mOnLoginCompleted();
writeDebugInfo();
+
+ // we logged in successfully, so save settings on logout
+ llinfos << "Login successful, per account settings will be saved on log out." << llendl;
+ mSavePerAccountSettings=true;
}
void LLAppViewer::launchUpdater()
@@ -5035,7 +5073,7 @@ void LLAppViewer::launchUpdater()
#endif
// *TODO change userserver to be grid on both viewer and sim, since
// userserver no longer exists.
- query_map["userserver"] = LLGridManager::getInstance()->getGridLabel();
+ query_map["userserver"] = LLGridManager::getInstance()->getGridId();
query_map["channel"] = LLVersionInfo::getChannel();
// *TODO constantize this guy
// *NOTE: This URL is also used in win_setup/lldownloader.cpp