aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2018-08-21 03:34:40 +0300
committerFilippos Karapetis2018-08-21 03:36:07 +0300
commit16fab2d480bfc586098778fef95ee0d1af66d8fd (patch)
tree6779635fbbd6ffc6bb2a5443c5ebf585427fb5d8
parent52ff27746fd85711d9d1dd4b2772feb8a153ffd5 (diff)
downloadscummvm-rg350-16fab2d480bfc586098778fef95ee0d1af66d8fd.tar.gz
scummvm-rg350-16fab2d480bfc586098778fef95ee0d1af66d8fd.tar.bz2
scummvm-rg350-16fab2d480bfc586098778fef95ee0d1af66d8fd.zip
SCI32: Ignore invalid kernel call when toggling the music in Hoyle 5
-rw-r--r--engines/sci/sound/soundcmd.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 54fdcf5f8f..7012746c80 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -634,6 +634,12 @@ reg_t SoundCommandParser::kDoSoundSendMidi(EngineState *s, int argc, reg_t *argv
uint16 controller = (argc == 5) ? argv[3].toUint16() : argv[2].toUint16();
uint16 param = (argc == 5) ? argv[4].toUint16() : argv[3].toUint16();
+ // This call is made in Hoyle 5 when toggling the music from the main menu.
+ // Ignore it for this game, since it doesn't use MIDI audio, and this call
+ // looks to be a leftover in Sound::mute (script 64989).
+ if (g_sci->getGameId() == GID_HOYLE5)
+ return s->r_acc;
+
if (argc == 4 && controller == 0xFF) {
midiCmd = 0xE0; // 0xE0: pitch wheel
uint16 pitch = CLIP<uint16>(argv[3].toSint16() + 0x2000, 0x0000, 0x3FFF);