aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llappviewer.cpp')
-rw-r--r--linden/indra/newview/llappviewer.cpp50
1 files changed, 39 insertions, 11 deletions
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 4485cdf..97deca0 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -62,7 +62,8 @@
62#include "llviewerdisplay.h" 62#include "llviewerdisplay.h"
63#include "llviewermedia.h" 63#include "llviewermedia.h"
64#include "llv4math.h" // for LL_VECTORIZE 64#include "llv4math.h" // for LL_VECTORIZE
65 65#include "llviewerparcelmedia.h"
66#include "llviewermediafocus.h"
66#include "llviewermessage.h" 67#include "llviewermessage.h"
67#include "llviewerobjectlist.h" 68#include "llviewerobjectlist.h"
68#include "llworldmap.h" 69#include "llworldmap.h"
@@ -103,7 +104,8 @@
103#include "llassetstorage.h" 104#include "llassetstorage.h"
104#include "llpolymesh.h" 105#include "llpolymesh.h"
105#include "llcachename.h" 106#include "llcachename.h"
106#include "audioengine.h" 107#include "llaudioengine.h"
108#include "llstreamingaudio.h"
107#include "llviewermenu.h" 109#include "llviewermenu.h"
108#include "llselectmgr.h" 110#include "llselectmgr.h"
109#include "lltrans.h" 111#include "lltrans.h"
@@ -716,8 +718,15 @@ bool LLAppViewer::init()
716 LLViewerJointMesh::updateVectorize(); 718 LLViewerJointMesh::updateVectorize();
717 719
718 // load MIME type -> media impl mappings 720 // load MIME type -> media impl mappings
719 LLMIMETypes::parseMIMETypes( std::string("mime_types.xml") ); 721 std::string mime_types_name;
720 722#if LL_DARWIN
723 mime_types_name = "mime_types_mac.xml";
724#elif LL_LINUX
725 mime_types_name = "mime_types_linux.xml";
726#else
727 mime_types_name = "mime_types_windows.xml";
728#endif
729 LLMIMETypes::parseMIMETypes( mime_types_name );
721 730
722 // Copy settings to globals. *TODO: Remove or move to appropriage class initializers 731 // Copy settings to globals. *TODO: Remove or move to appropriage class initializers
723 settings_to_globals(); 732 settings_to_globals();
@@ -1199,7 +1208,10 @@ bool LLAppViewer::cleanup()
1199 1208
1200 //reset balance for not playing the UI-Sound 1209 //reset balance for not playing the UI-Sound
1201 //when relogging into another account 1210 //when relogging into another account
1202 gStatusBar->clearBalance(); 1211 if (gStatusBar)
1212 {
1213 gStatusBar->clearBalance();
1214 }
1203 1215
1204 if (mQuitRequested) 1216 if (mQuitRequested)
1205 { 1217 {
@@ -1273,6 +1285,14 @@ bool LLAppViewer::cleanup()
1273 1285
1274 if (gAudiop) 1286 if (gAudiop)
1275 { 1287 {
1288 // shut down the streaming audio sub-subsystem first, in case it relies on not outliving the general audio subsystem.
1289
1290 LLStreamingAudioInterface *sai = gAudiop->getStreamingAudioImpl();
1291 delete sai;
1292 gAudiop->setStreamingAudioImpl(NULL);
1293
1294 // shut down the audio subsystem
1295
1276 bool want_longname = false; 1296 bool want_longname = false;
1277 if (gAudiop->getDriverName(want_longname) == "FMOD") 1297 if (gAudiop->getDriverName(want_longname) == "FMOD")
1278 { 1298 {
@@ -1502,7 +1522,9 @@ bool LLAppViewer::cleanup()
1502 //Note: 1522 //Note:
1503 //LLViewerMedia::cleanupClass() has to be put before gImageList.shutdown() 1523 //LLViewerMedia::cleanupClass() has to be put before gImageList.shutdown()
1504 //because some new image might be generated during cleaning up media. --bao 1524 //because some new image might be generated during cleaning up media. --bao
1525 LLViewerMediaFocus::cleanupClass();
1505 LLViewerMedia::cleanupClass(); 1526 LLViewerMedia::cleanupClass();
1527 LLViewerParcelMedia::cleanupClass();
1506 gImageList.shutdown(); // shutdown again in case a callback added something 1528 gImageList.shutdown(); // shutdown again in case a callback added something
1507 LLUIImageList::getInstance()->cleanUp(); 1529 LLUIImageList::getInstance()->cleanUp();
1508 1530
@@ -3265,12 +3287,15 @@ void LLAppViewer::saveFinalSnapshot()
3265 gSavedSettings.setBOOL("ShowParcelOwners", FALSE); 3287 gSavedSettings.setBOOL("ShowParcelOwners", FALSE);
3266 idle(); 3288 idle();
3267 3289
3268 std::string snap_filename = gDirUtilp->getLindenUserDir(); 3290 std::string snap_filename = gDirUtilp->getLindenUserDir(true);
3269 snap_filename += gDirUtilp->getDirDelimiter(); 3291 if (!snap_filename.empty())
3270 snap_filename += SCREEN_LAST_FILENAME; 3292 {
3271 // use full pixel dimensions of viewer window (not post-scale dimensions) 3293 snap_filename += gDirUtilp->getDirDelimiter();
3272 gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, TRUE); 3294 snap_filename += SCREEN_LAST_FILENAME;
3273 mSavedFinalSnapshot = TRUE; 3295 // use full pixel dimensions of viewer window (not post-scale dimensions)
3296 gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, TRUE);
3297 mSavedFinalSnapshot = TRUE;
3298 }
3274 } 3299 }
3275} 3300}
3276 3301
@@ -3689,6 +3714,9 @@ void LLAppViewer::idle()
3689 gAgent.updateCamera(); 3714 gAgent.updateCamera();
3690 } 3715 }
3691 3716
3717 // update media focus
3718 LLViewerMediaFocus::getInstance()->update();
3719
3692 // objects and camera should be in sync, do LOD calculations now 3720 // objects and camera should be in sync, do LOD calculations now
3693 { 3721 {
3694 LLFastTimer t(LLFastTimer::FTM_LOD_UPDATE); 3722 LLFastTimer t(LLFastTimer::FTM_LOD_UPDATE);