diff options
-rw-r--r-- | indra/media_plugins/webkit/windows_volume_catcher.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llpanelnearbymedia.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llpanelprimmediacontrols.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llviewermedia.h | 6 |
4 files changed, 20 insertions, 31 deletions
diff --git a/indra/media_plugins/webkit/windows_volume_catcher.cpp b/indra/media_plugins/webkit/windows_volume_catcher.cpp index 1c1ef0b42f..8debe8fac6 100644 --- a/indra/media_plugins/webkit/windows_volume_catcher.cpp +++ b/indra/media_plugins/webkit/windows_volume_catcher.cpp @@ -232,14 +232,22 @@ VolumeCatcherImpl::VolumeCatcherImpl() : mVolume(1.0f), // default volume is max mPan(0.f) // default pan is centered { - // for each reported mixer "device", create a proxy object and add to list - U32 num_mixers = mixerGetNumDevs(); - for (U32 mixer_index = 0; mixer_index < num_mixers; ++mixer_index) + OSVERSIONINFOEX V = {sizeof(OSVERSIONINFOEX)}; //EX for NT 5.0 and later + + ::GetVersionEx((POSVERSIONINFO)&V); + + // disable volume on XP and below + if (V.dwPlatformId == VER_PLATFORM_WIN32_NT && V.dwMajorVersion >= 6) { - Mixer* mixerp = Mixer::create(mixer_index); - if (mixerp) + // for each reported mixer "device", create a proxy object and add to list + U32 num_mixers = mixerGetNumDevs(); + for (U32 mixer_index = 0; mixer_index < num_mixers; ++mixer_index) { - mMixers.push_back(mixerp); + Mixer* mixerp = Mixer::create(mixer_index); + if (mixerp) + { + mMixers.push_back(mixerp); + } } } } @@ -279,6 +287,7 @@ void VolumeCatcherImpl::setVolume(F32 volume) } } + mVolume = volume; } diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 79786c06d9..6411cd802d 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -1062,15 +1062,10 @@ void LLPanelNearByMedia::showBasicControls(bool playing, bool include_zoom, bool mStopCtrl->setVisible(playing); mPlayCtrl->setVisible(!playing); mPauseCtrl->setVisible(false); -#ifdef PER_MEDIA_VOLUME mVolumeSliderCtrl->setVisible(true); mMuteCtrl->setVisible(true); mMuteBtn->setValue(muted); mVolumeSlider->setValue(volume); -#else - mVolumeSliderCtrl->setVisible(false); - mMuteCtrl->setVisible(false); -#endif mZoomCtrl->setVisible(include_zoom && !is_zoomed); mUnzoomCtrl->setVisible(include_zoom && is_zoomed); mStopCtrl->setEnabled(true); diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 5209d50755..0648d99685 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -350,6 +350,11 @@ void LLPanelPrimMediaControls::updateShape() mHomeCtrl->setEnabled(has_focus && can_navigate); LLPluginClassMediaOwner::EMediaStatus result = ((media_impl != NULL) && media_impl->hasMedia()) ? media_plugin->getStatus() : LLPluginClassMediaOwner::MEDIA_NONE; + mVolumeCtrl->setVisible(has_focus); + mVolumeCtrl->setEnabled(has_focus); + mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible()); + mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible()); + if(media_plugin && media_plugin->pluginSupportsMediaTime()) { mReloadCtrl->setEnabled(false); @@ -462,14 +467,6 @@ void LLPanelPrimMediaControls::updateShape() mSkipBackCtrl->setVisible(FALSE); mSkipBackCtrl->setEnabled(FALSE); -#ifdef PER_MEDIA_VOLUME - // these should be pulled up above the pluginSupportsMediaTime - // if check once we always have PER_MEDIA_VOLUME turned on - mVolumeCtrl->setVisible(has_focus); - mVolumeCtrl->setEnabled(has_focus); - mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible()); - mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible()); - if(media_impl->getVolume() <= 0.0) { mMuteBtn->setToggleState(true); @@ -478,12 +475,6 @@ void LLPanelPrimMediaControls::updateShape() { mMuteBtn->setToggleState(false); } -#else - mVolumeCtrl->setVisible(FALSE); - mVolumeSliderCtrl->setVisible(FALSE); - mVolumeCtrl->setEnabled(FALSE); - mVolumeSliderCtrl->setEnabled(FALSE); -#endif if (mMediaPanelScroll) { diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index bc6716697e..e829d7a5b4 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -46,12 +46,6 @@ #include "llurl.h" - -#if defined(LL_DARWIN) || (LL_WINDOWS && !LL_RELEASE_FOR_DOWNLOAD ) -#define PER_MEDIA_VOLUME -#endif - - class LLViewerMediaImpl; class LLUUID; class LLViewerMediaTexture; |