diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-11-26 18:50:40 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-11-26 18:50:40 +0200 |
commit | e1c7688b2c69c3a79b673011abe6d59ce97acdff (patch) | |
tree | da4f904d34e61196a8ef9e441a040446241f69b9 /indra/newview/llviewermedia.cpp | |
parent | df497ee700eab8b93c2b94bc1abfcabedf424900 (diff) |
SL-10101 Remade most frequent setting calls to cached variants
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r-- | indra/newview/llviewermedia.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 22a21c9ca3..f4e1524371 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -682,8 +682,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg) std::vector<LLViewerMediaImpl*> proximity_order; - bool inworld_media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia"); - bool inworld_audio_enabled = gSavedSettings.getBOOL("AudioStreamingMusic"); + static LLCachedControl<bool> inworld_media_enabled(gSavedSettings, "AudioStreamingMedia", true); + static LLCachedControl<bool> inworld_audio_enabled(gSavedSettings, "AudioStreamingMusic", true); U32 max_instances = gSavedSettings.getU32("PluginInstancesTotal"); U32 max_normal = gSavedSettings.getU32("PluginInstancesNormal"); U32 max_low = gSavedSettings.getU32("PluginInstancesLow"); @@ -941,7 +941,8 @@ void LLViewerMedia::setAllMediaEnabled(bool val) LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel()); } - if (gSavedSettings.getBOOL("AudioStreamingMusic") && + static LLCachedControl<bool> audio_streaming_music(gSavedSettings, "AudioStreamingMusic", true); + if (audio_streaming_music && !LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()) @@ -1012,7 +1013,8 @@ void LLViewerMedia::setAllMediaPaused(bool val) LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel()); } - if (gSavedSettings.getBOOL("AudioStreamingMusic") && + static LLCachedControl<bool> audio_streaming_music(gSavedSettings, "AudioStreamingMusic", true); + if (audio_streaming_music && !LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()) |