diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 31 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewerstatsrecorder.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llviewerstatsrecorder.h | 9 |
4 files changed, 21 insertions, 30 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e39d9e7e20..b75d02a8a7 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -801,6 +801,20 @@ bool LLAppViewer::init() LLUIImageList::getInstance(), ui_audio_callback, deferred_ui_audio_callback); + + 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); + } + } + LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ; // NOW LLUI::getLanguage() should work. gDirUtilp must know the language @@ -1265,6 +1279,7 @@ bool LLAppViewer::init() //LLSimpleton creations LLEnvironment::createInstance(); LLWorld::createInstance(); + LLViewerStatsRecorder::createInstance(); LLSelectMgr::createInstance(); LLViewerCamera::createInstance(); LL::GLTFSceneManager::createInstance(); @@ -1606,7 +1621,7 @@ bool LLAppViewer::doFrame() { LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df gMeshRepo"); - gMeshRepo.update() ; + gMeshRepo.update() ; } if(!total_work_pending) //pause texture fetching threads if nothing to process. @@ -2147,6 +2162,7 @@ bool LLAppViewer::cleanup() LL::GLTFSceneManager::deleteSingleton(); LLEnvironment::deleteSingleton(); LLSelectMgr::deleteSingleton(); + LLViewerStatsRecorder::deleteSingleton(); LLViewerEventRecorder::deleteSingleton(); LLWorld::deleteSingleton(); LLVoiceClient::deleteSingleton(); @@ -2794,19 +2810,6 @@ bool LLAppViewer::initConfiguration() gSavedSettings.getString("Language")); } - 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); - } - } - if (gNonInteractive) { tempSetControl("AllowMultipleViewers", "true"); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index b993ba16d5..7cefa21125 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1285,7 +1285,6 @@ bool idle_startup() // // Initialize classes w/graphics stuff. // - LLViewerStatsRecorder::instance(); // Since textures work in threads LLSurface::initClasses(); display_startup(); diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 88edb96fbb..58065ecce5 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -27,16 +27,13 @@ #include "llviewerprecompiledheaders.h" #include "llviewerstatsrecorder.h" - #include "llcontrol.h" #include "llfile.h" +#include "llviewercontrol.h" #include "llviewerregion.h" #include "llviewerobject.h" #include "llworld.h" -extern LLControlGroup gSavedSettings; - -LLViewerStatsRecorder* LLViewerStatsRecorder::sInstance = NULL; LLViewerStatsRecorder::LLViewerStatsRecorder() : mStatsFile(NULL), mTimer(), @@ -48,11 +45,6 @@ LLViewerStatsRecorder::LLViewerStatsRecorder() : mMaxDuration(300.f), mSkipSaveIfZeros(false) { - if (NULL != sInstance) - { - LL_ERRS() << "Attempted to create multiple instances of LLViewerStatsRecorder!" << LL_ENDL; - } - sInstance = this; clearStats(); } diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h index ecc321c0a8..2108f49dc3 100644 --- a/indra/newview/llviewerstatsrecorder.h +++ b/indra/newview/llviewerstatsrecorder.h @@ -38,13 +38,12 @@ class LLMutex; class LLViewerObject; -class LLViewerStatsRecorder : public LLSingleton<LLViewerStatsRecorder> +class LLViewerStatsRecorder : public LLSimpleton<LLViewerStatsRecorder> { - LLSINGLETON(LLViewerStatsRecorder); +public: + LLViewerStatsRecorder(); LOG_CLASS(LLViewerStatsRecorder); ~LLViewerStatsRecorder(); - - public: // Enable/disable stats recording. This is broken down into two // flags so we can record stats without writing them to the log // file. This is useful to analyzing updates for scene loading. @@ -140,8 +139,6 @@ private: void closeStatsFile(); void makeStatsFileName(); - static LLViewerStatsRecorder* sInstance; - LLFILE * mStatsFile; // File to write data into std::string mStatsFileName; |