diff options
author | Colin Snover | 2017-06-09 21:42:15 -0500 |
---|---|---|
committer | Colin Snover | 2017-06-09 23:30:10 -0500 |
commit | 40566820a71adb63d34a7831c85efacc430f3481 (patch) | |
tree | 83072fa938d80689fb0c4d494656c39c1215b194 /engines/sci | |
parent | 57d257b36a1a4c9657dff360cca4d1d58bb880e0 (diff) | |
download | scummvm-rg350-40566820a71adb63d34a7831c85efacc430f3481.tar.gz scummvm-rg350-40566820a71adb63d34a7831c85efacc430f3481.tar.bz2 scummvm-rg350-40566820a71adb63d34a7831c85efacc430f3481.zip |
SCI: Return the original master sound volume when mute is on
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/sound/music.cpp | 8 |
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; } |