aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sword2/sword2.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 1060dcf728..3cdab2bd2b 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -326,12 +326,20 @@ void Sword2Engine::registerDefaultSettings() {
}
void Sword2Engine::syncSoundSettings() {
- // Sound settings. At the time of writing, not all of these can be set
- // by the global options dialog, but it seems silly to split them up.
_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"));
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);
+ }
+
_sound->muteMusic(ConfMan.getBool("music_mute"));
_sound->muteSpeech(ConfMan.getBool("speech_mute"));
_sound->muteFx(ConfMan.getBool("sfx_mute"));
@@ -356,6 +364,13 @@ void Sword2Engine::writeSettings() {
ConfMan.setBool("object_labels", _mouse->getObjectLabels());
ConfMan.setInt("reverse_stereo", _sound->isReverseStereo());
+ // If even one sound type is unmuted, we can't say that all sound is
+ // muted.
+
+ if (!_sound->isMusicMute() || !_sound->isSpeechMute() || !_sound->isFxMute()) {
+ ConfMan.setBool("mute", false);
+ }
+
ConfMan.flushToDisk();
}