aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2/sword2.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2010-10-13 03:57:44 +0000
committerJohannes Schickel2010-10-13 03:57:44 +0000
commit75e8452b6e6a2bf4fb2f588aa00b428a60d873b5 (patch)
treef29541d55309487a94bd1d38e8b53bb3dde9aec6 /engines/sword2/sword2.cpp
parent48ee83b88957dab86bc763e9ef21a70179fa8679 (diff)
parente9f50882ea5b6beeefa994040be9d3bab6a1f107 (diff)
downloadscummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.gz
scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.bz2
scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.zip
OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend changes into the branch. I suppose the gp2x backend and probably all new backends, i.e. gph, dingux etc., might not compile anymore. Since I have no way of testing those it would be nice if porters could look into getting those up to speed in this branch. svn-id: r53399
Diffstat (limited to 'engines/sword2/sword2.cpp')
-rw-r--r--engines/sword2/sword2.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 3cdab2bd2b..b3b688771a 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -326,18 +326,24 @@ void Sword2Engine::registerDefaultSettings() {
}
void Sword2Engine::syncSoundSettings() {
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
+ bool mute = ConfMan.getBool("mute");
+
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, mute ? 0 : ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, mute ? 0 : ConfMan.getInt("speech_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, mute ? 0 : ConfMan.getInt("sfx_volume"));
setSubtitles(ConfMan.getBool("subtitles"));
// Our own settings dialog can mute the music, speech and sound effects
// individually. ScummVM's settings dialog has one master mute setting.
- if (ConfMan.getBool("mute")) {
- ConfMan.setBool("music_mute", true);
- ConfMan.setBool("speech_mute", true);
- ConfMan.setBool("sfx_mute", true);
+ if (ConfMan.hasKey("mute")) {
+ ConfMan.setBool("music_mute", ConfMan.getBool("mute"));
+ ConfMan.setBool("speech_mute", ConfMan.getBool("mute"));
+ ConfMan.setBool("sfx_mute", ConfMan.getBool("mute"));
+
+ if (!mute) // it is false
+ // So remove it in order to let individual volumes work
+ ConfMan.removeKey("mute", ConfMan.getActiveDomainName());
}
_sound->muteMusic(ConfMan.getBool("music_mute"));