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.cpp32
1 files changed, 27 insertions, 5 deletions
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 96fc451..3a3f51b 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"
@@ -446,7 +448,7 @@ static void settings_modify()
446 LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] 448 LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4]
447 gDebugGL = gSavedSettings.getBOOL("RenderDebugGL"); 449 gDebugGL = gSavedSettings.getBOOL("RenderDebugGL");
448 gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline"); 450 gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline");
449 gAuditTexture = gSavedSettings.getBOOL("AuditTexture"); 451// gAuditTexture = gSavedSettings.getBOOL("AuditTexture");
450#if LL_VECTORIZE 452#if LL_VECTORIZE
451 if (gSysCPU.hasAltivec()) 453 if (gSysCPU.hasAltivec())
452 { 454 {
@@ -706,8 +708,15 @@ bool LLAppViewer::init()
706 LLViewerJointMesh::updateVectorize(); 708 LLViewerJointMesh::updateVectorize();
707 709
708 // load MIME type -> media impl mappings 710 // load MIME type -> media impl mappings
709 LLMIMETypes::parseMIMETypes( std::string("mime_types.xml") ); 711 std::string mime_types_name;
710 712#if LL_DARWIN
713 mime_types_name = "mime_types_mac.xml";
714#elif LL_LINUX
715 mime_types_name = "mime_types_linux.xml";
716#else
717 mime_types_name = "mime_types.xml";
718#endif
719 LLMIMETypes::parseMIMETypes( mime_types_name );
711 720
712 // Copy settings to globals. *TODO: Remove or move to appropriage class initializers 721 // Copy settings to globals. *TODO: Remove or move to appropriage class initializers
713 settings_to_globals(); 722 settings_to_globals();
@@ -1270,6 +1279,14 @@ bool LLAppViewer::cleanup()
1270 1279
1271 if (gAudiop) 1280 if (gAudiop)
1272 { 1281 {
1282 // shut down the streaming audio sub-subsystem first, in case it relies on not outliving the general audio subsystem.
1283
1284 LLStreamingAudioInterface *sai = gAudiop->getStreamingAudioImpl();
1285 delete sai;
1286 gAudiop->setStreamingAudioImpl(NULL);
1287
1288 // shut down the audio subsystem
1289
1273 bool want_longname = false; 1290 bool want_longname = false;
1274 if (gAudiop->getDriverName(want_longname) == "FMOD") 1291 if (gAudiop->getDriverName(want_longname) == "FMOD")
1275 { 1292 {
@@ -1499,7 +1516,9 @@ bool LLAppViewer::cleanup()
1499 //Note: 1516 //Note:
1500 //LLViewerMedia::cleanupClass() has to be put before gImageList.shutdown() 1517 //LLViewerMedia::cleanupClass() has to be put before gImageList.shutdown()
1501 //because some new image might be generated during cleaning up media. --bao 1518 //because some new image might be generated during cleaning up media. --bao
1519 LLViewerMediaFocus::cleanupClass();
1502 LLViewerMedia::cleanupClass(); 1520 LLViewerMedia::cleanupClass();
1521 LLViewerParcelMedia::cleanupClass();
1503 gImageList.shutdown(); // shutdown again in case a callback added something 1522 gImageList.shutdown(); // shutdown again in case a callback added something
1504 LLUIImageList::getInstance()->cleanUp(); 1523 LLUIImageList::getInstance()->cleanUp();
1505 1524
@@ -3687,6 +3706,9 @@ void LLAppViewer::idle()
3687 gAgent.updateCamera(); 3706 gAgent.updateCamera();
3688 } 3707 }
3689 3708
3709 // update media focus
3710 LLViewerMediaFocus::getInstance()->update();
3711
3690 // objects and camera should be in sync, do LOD calculations now 3712 // objects and camera should be in sync, do LOD calculations now
3691 { 3713 {
3692 LLFastTimer t(LLFastTimer::FTM_LOD_UPDATE); 3714 LLFastTimer t(LLFastTimer::FTM_LOD_UPDATE);