summaryrefslogtreecommitdiff
path: root/indra/media_plugins/webkit
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-04-19 17:01:47 -0700
committerRichard Nelson <none@none>2010-04-19 17:01:47 -0700
commit3afda3d1c020647604748ef5001526ca3fcf0759 (patch)
treeb2c7c3a9bef344b55cfe9d47a5b5dba9633f1bde /indra/media_plugins/webkit
parent1c352ebb5bfda6d53c844dca130302b79b918796 (diff)
EXT-6921 - Media Volume Changes changes system volume on WinXP
reviewed by Callum
Diffstat (limited to 'indra/media_plugins/webkit')
-rw-r--r--indra/media_plugins/webkit/windows_volume_catcher.cpp21
1 files changed, 15 insertions, 6 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;
}