aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-06-09 21:42:15 -0500
committerColin Snover2017-06-09 23:30:10 -0500
commit40566820a71adb63d34a7831c85efacc430f3481 (patch)
tree83072fa938d80689fb0c4d494656c39c1215b194
parent57d257b36a1a4c9657dff360cca4d1d58bb880e0 (diff)
downloadscummvm-rg350-40566820a71adb63d34a7831c85efacc430f3481.tar.gz
scummvm-rg350-40566820a71adb63d34a7831c85efacc430f3481.tar.bz2
scummvm-rg350-40566820a71adb63d34a7831c85efacc430f3481.zip
SCI: Return the original master sound volume when mute is on
-rw-r--r--engines/sci/sound/music.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index ca5644d90b..987983a7f9 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -739,6 +739,14 @@ void SciMusic::soundToggle(MusicEntry *pSnd, bool pause) {
}
uint16 SciMusic::soundGetMasterVolume() {
+ if (ConfMan.getBool("mute")) {
+ // When a game is muted, the master volume is set to zero so that
+ // mute applies to external MIDI devices, but this should not be
+ // communicated to the game as it will cause the UI to be drawn with
+ // the wrong (zero) volume for music
+ return (ConfMan.getInt("music_volume") + 1) * MUSIC_MASTERVOLUME_MAX / Audio::Mixer::kMaxMixerVolume;
+ }
+
return _masterVolume;
}