summaryrefslogtreecommitdiff
path: root/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r--indra/newview/llstatusbar.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 5e04801d85..8c741085b8 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -310,16 +310,18 @@ void LLStatusBar::refresh()
// update the master volume button state
bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute();
mBtnVolume->setToggleState(mute_audio);
-
+
+ LLViewerMedia* media_inst = LLViewerMedia::getInstance();
+
// Disable media toggle if there's no media, parcel media, and no parcel audio
// (or if media is disabled)
bool button_enabled = (gSavedSettings.getBOOL("AudioStreamingMusic")||gSavedSettings.getBOOL("AudioStreamingMedia")) &&
- (LLViewerMedia::hasInWorldMedia() || LLViewerMedia::hasParcelMedia() || LLViewerMedia::hasParcelAudio());
+ (media_inst->hasInWorldMedia() || media_inst->hasParcelMedia() || media_inst->hasParcelAudio());
mMediaToggle->setEnabled(button_enabled);
// Note the "sense" of the toggle is opposite whether media is playing or not
- bool any_media_playing = (LLViewerMedia::isAnyMediaPlaying() ||
- LLViewerMedia::isParcelMediaPlaying() ||
- LLViewerMedia::isParcelAudioPlaying());
+ bool any_media_playing = (media_inst->isAnyMediaPlaying() ||
+ media_inst->isParcelMediaPlaying() ||
+ media_inst->isParcelAudioPlaying());
mMediaToggle->setValue(!any_media_playing);
}
@@ -578,7 +580,7 @@ void LLStatusBar::onClickMediaToggle(void* data)
LLStatusBar *status_bar = (LLStatusBar*)data;
// "Selected" means it was showing the "play" icon (so media was playing), and now it shows "pause", so turn off media
bool pause = status_bar->mMediaToggle->getValue();
- LLViewerMedia::setAllMediaPaused(pause);
+ LLViewerMedia::getInstance()->setAllMediaPaused(pause);
}
BOOL can_afford_transaction(S32 cost)