diff options
| author | Graham Linden <graham@lindenlab.com> | 2018-06-27 15:26:54 +0100 | 
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2018-06-27 15:26:54 +0100 | 
| commit | 9a00d545d480fef996f0c32fc49e5c37b1954b4a (patch) | |
| tree | 06d80b0575a3a2e6c825ff05e996db27251415e2 /indra | |
| parent | c0bd1cd4321444615ae0e22b132052f8ba24ec94 (diff) | |
| parent | f18d41d2fa76e59ccc5187777e22d4a9f628fed9 (diff) | |
Merge
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llcommon/llcoros.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/llpanelnearbymedia.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llviewermedia.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/llviewermedia.h | 2 | 
4 files changed, 32 insertions, 12 deletions
| diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp index 3165ce0743..67e9fad1ab 100644 --- a/indra/llcommon/llcoros.cpp +++ b/indra/llcommon/llcoros.cpp @@ -284,17 +284,20 @@ void LLCoros::setStackSize(S32 stacksize)  void LLCoros::printActiveCoroutines()  {      LL_INFOS("LLCoros") << "Number of active coroutines: " << (S32)mCoros.size() << LL_ENDL; -    LL_INFOS("LLCoros") << "-------------- List of active coroutines ------------"; -    CoroMap::iterator iter; -    CoroMap::iterator end = mCoros.end(); -    F64 time = LLTimer::getTotalSeconds(); -    for (iter = mCoros.begin(); iter != end; iter++) +    if (mCoros.size() > 0)      { -        F64 life_time = time - iter->second->mCreationTime; -        LL_CONT << LL_NEWLINE << "Name: " << iter->first << " life: " << life_time; +        LL_INFOS("LLCoros") << "-------------- List of active coroutines ------------"; +        CoroMap::iterator iter; +        CoroMap::iterator end = mCoros.end(); +        F64 time = LLTimer::getTotalSeconds(); +        for (iter = mCoros.begin(); iter != end; iter++) +        { +            F64 life_time = time - iter->second->mCreationTime; +            LL_CONT << LL_NEWLINE << "Name: " << iter->first << " life: " << life_time; +        } +        LL_CONT << LL_ENDL; +        LL_INFOS("LLCoros") << "-----------------------------------------------------" << LL_ENDL;      } -    LL_CONT << LL_ENDL; -    LL_INFOS("LLCoros") << "-----------------------------------------------------" << LL_ENDL;  }  #if LL_WINDOWS diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index d8ef5b39ad..f3a2ed9408 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -1168,12 +1168,12 @@ void LLPanelNearByMedia::onClickSelectedMediaMute()  			F32 volume = impl->getVolume();  			if(volume > 0.0)  			{ -				impl->setVolume(0.0); +				impl->setMute(true);  			}  			else if (mVolumeSlider->getValueF32() == 0.0)  			{ -				impl->setVolume(1.0); -				mVolumeSlider->setValue(1.0); +				impl->setMute(false); +				mVolumeSlider->setValue(impl->getVolume());  			}  			else   			{ diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 4334cbfda3..22a21c9ca3 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1555,6 +1555,7 @@ LLViewerMediaImpl::LLViewerMediaImpl(	  const LLUUID& texture_id,  	mNavigateServerRequest(false),  	mMediaSourceFailed(false),  	mRequestedVolume(1.0f), +	mPreviousVolume(1.0f),  	mIsMuted(false),  	mNeedsMuteCheck(false),  	mPreviousMediaState(MEDIA_NONE), @@ -2082,6 +2083,20 @@ void LLViewerMediaImpl::setVolume(F32 volume)  }  ////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::setMute(bool mute) +{ +	if (mute) +	{ +		mPreviousVolume = mRequestedVolume; +		setVolume(0.0); +	} +	else +	{ +		setVolume(mPreviousVolume); +	} +} + +//////////////////////////////////////////////////////////////////////////////////////////  void LLViewerMediaImpl::updateVolume()  {  	if(mMediaSource) diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index c52960dfcf..e2e758befb 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -216,6 +216,7 @@ public:  	void skipBack(F32 step_scale);  	void skipForward(F32 step_scale);  	void setVolume(F32 volume); +	void setMute(bool mute);  	void updateVolume();  	F32 getVolume();  	void focus(bool focus); @@ -448,6 +449,7 @@ private:  	bool mNavigateServerRequest;  	bool mMediaSourceFailed;  	F32 mRequestedVolume; +	F32 mPreviousVolume;  	bool mIsMuted;  	bool mNeedsMuteCheck;  	int mPreviousMediaState; | 
