From 40566820a71adb63d34a7831c85efacc430f3481 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Fri, 9 Jun 2017 21:42:15 -0500 Subject: SCI: Return the original master sound volume when mute is on --- engines/sci/sound/music.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'engines/sci') 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; } -- cgit v1.2.3