diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llappviewer.cpp | 54 |
1 files changed, 41 insertions, 13 deletions
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index f422f33..3a3f51b 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -61,6 +61,7 @@ | |||
61 | #include "llviewerwindow.h" | 61 | #include "llviewerwindow.h" |
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 "llviewerparcelmedia.h" | 65 | #include "llviewerparcelmedia.h" |
65 | #include "llviewermediafocus.h" | 66 | #include "llviewermediafocus.h" |
66 | #include "llviewermessage.h" | 67 | #include "llviewermessage.h" |
@@ -1193,6 +1194,19 @@ bool LLAppViewer::cleanup() | |||
1193 | 1194 | ||
1194 | llinfos << "Viewer disconnected" << llendflush; | 1195 | llinfos << "Viewer disconnected" << llendflush; |
1195 | 1196 | ||
1197 | if (!mQuitRequested) //not doing it on quit, because the quitting voiceclient | ||
1198 | { //*might* crash imprudence TODO: fix the voiceclient instead | ||
1199 | //this deletes all your buddies | ||
1200 | LLAvatarTracker::instance().reset(); | ||
1201 | // reset group data. Blame LL for the need to clear a member variable through a global | ||
1202 | LLGroupMgr::getInstance()->clearGroups(); | ||
1203 | gAgent.mGroups.clear(); | ||
1204 | } | ||
1205 | |||
1206 | //reset balance for not playing the UI-Sound | ||
1207 | //when relogging into another account | ||
1208 | gStatusBar->clearBalance(); | ||
1209 | |||
1196 | if (mQuitRequested) | 1210 | if (mQuitRequested) |
1197 | { | 1211 | { |
1198 | display_cleanup(); | 1212 | display_cleanup(); |
@@ -1473,8 +1487,11 @@ bool LLAppViewer::cleanup() | |||
1473 | pending += LLAppViewer::getTextureFetch()->update(1); // unpauses the texture fetch thread | 1487 | pending += LLAppViewer::getTextureFetch()->update(1); // unpauses the texture fetch thread |
1474 | pending += LLVFSThread::updateClass(0); | 1488 | pending += LLVFSThread::updateClass(0); |
1475 | pending += LLLFSThread::updateClass(0); | 1489 | pending += LLLFSThread::updateClass(0); |
1476 | F64 idle_time = idleTimer.getElapsedTimeF64(); | 1490 | if (pending == 0) |
1477 | if (!pending || idle_time >= max_idle_time) | 1491 | { |
1492 | break; | ||
1493 | } | ||
1494 | if (idleTimer.getElapsedTimeF64() >= max_idle_time) | ||
1478 | { | 1495 | { |
1479 | llwarns << "Quitting with pending background tasks." << llendl; | 1496 | llwarns << "Quitting with pending background tasks." << llendl; |
1480 | break; | 1497 | break; |
@@ -3740,10 +3757,18 @@ void LLAppViewer::idleShutdown() | |||
3740 | else | 3757 | else |
3741 | { | 3758 | { |
3742 | mQuitRequested=true; | 3759 | mQuitRequested=true; |
3743 | //awfixme | ||
3744 | forceQuit(); | 3760 | forceQuit(); |
3745 | } | 3761 | } |
3746 | 3762 | ||
3763 | |||
3764 | static bool saved_snapshot = false; | ||
3765 | if (!saved_snapshot) | ||
3766 | { | ||
3767 | saved_snapshot = true; | ||
3768 | saveFinalSnapshot(); | ||
3769 | return; | ||
3770 | } | ||
3771 | |||
3747 | // Attempt to close all floaters that might be | 3772 | // Attempt to close all floaters that might be |
3748 | // editing things. | 3773 | // editing things. |
3749 | if (gFloaterView) | 3774 | if (gFloaterView) |
@@ -3751,6 +3776,13 @@ void LLAppViewer::idleShutdown() | |||
3751 | // application is quitting | 3776 | // application is quitting |
3752 | gFloaterView->closeAllChildren(true); | 3777 | gFloaterView->closeAllChildren(true); |
3753 | } | 3778 | } |
3779 | |||
3780 | // extra invitation to the Snapshot Floater | ||
3781 | // not to show on the loginscreen when relogging | ||
3782 | if (gSnapshotFloaterView) | ||
3783 | { | ||
3784 | gSnapshotFloaterView->closeAllChildren(true); | ||
3785 | } | ||
3754 | 3786 | ||
3755 | // close IM interface | 3787 | // close IM interface |
3756 | if(gIMMgr) | 3788 | if(gIMMgr) |
@@ -3767,13 +3799,7 @@ void LLAppViewer::idleShutdown() | |||
3767 | return; | 3799 | return; |
3768 | } | 3800 | } |
3769 | 3801 | ||
3770 | static bool saved_snapshot = false; | 3802 | |
3771 | if (!saved_snapshot) | ||
3772 | { | ||
3773 | saved_snapshot = true; | ||
3774 | saveFinalSnapshot(); | ||
3775 | return; | ||
3776 | } | ||
3777 | 3803 | ||
3778 | const F32 SHUTDOWN_UPLOAD_SAVE_TIME = 5.f; | 3804 | const F32 SHUTDOWN_UPLOAD_SAVE_TIME = 5.f; |
3779 | 3805 | ||
@@ -4167,9 +4193,10 @@ void LLAppViewer::resumeMainloopTimeout(const std::string& state, F32 secs) | |||
4167 | { | 4193 | { |
4168 | if(secs < 0.0f) | 4194 | if(secs < 0.0f) |
4169 | { | 4195 | { |
4170 | secs = gSavedSettings.getF32("MainloopTimeoutDefault"); | 4196 | static F32 *sMainloopTimeoutDefault = rebind_llcontrol<F32>("MainloopTimeoutDefault", &gSavedSettings, true); |
4197 | secs = *sMainloopTimeoutDefault; | ||
4171 | } | 4198 | } |
4172 | 4199 | ||
4173 | mMainloopTimeout->setTimeout(secs); | 4200 | mMainloopTimeout->setTimeout(secs); |
4174 | mMainloopTimeout->start(state); | 4201 | mMainloopTimeout->start(state); |
4175 | } | 4202 | } |
@@ -4194,7 +4221,8 @@ void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs) | |||
4194 | { | 4221 | { |
4195 | if(secs < 0.0f) | 4222 | if(secs < 0.0f) |
4196 | { | 4223 | { |
4197 | secs = gSavedSettings.getF32("MainloopTimeoutDefault"); | 4224 | static F32 *sMainloopTimeoutDefault = rebind_llcontrol<F32>("MainloopTimeoutDefault", &gSavedSettings, true); |
4225 | secs = *sMainloopTimeoutDefault; | ||
4198 | } | 4226 | } |
4199 | 4227 | ||
4200 | mMainloopTimeout->setTimeout(secs); | 4228 | mMainloopTimeout->setTimeout(secs); |