diff options
author | athrxx | 2019-12-20 00:27:03 +0100 |
---|---|---|
committer | athrxx | 2019-12-20 14:32:24 +0100 |
commit | 2d7355dcf2ccfbffbb62dc2c795962eebcbd94cd (patch) | |
tree | f63704b6a2513fa62c93af2e40c3079393d27d49 /engines/kyra | |
parent | c5c8f3458bc6428640f4e8eefd12a25c9d44a55d (diff) | |
download | scummvm-rg350-2d7355dcf2ccfbffbb62dc2c795962eebcbd94cd.tar.gz scummvm-rg350-2d7355dcf2ccfbffbb62dc2c795962eebcbd94cd.tar.bz2 scummvm-rg350-2d7355dcf2ccfbffbb62dc2c795962eebcbd94cd.zip |
KYRA: (EOB/PC98) - fix music mute setting
(this has to be done a bit different for PC-98, since - unlike the other currently supported platforms - PC-98 has ingame music)
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/engine/eobcommon.cpp | 16 | ||||
-rw-r--r-- | engines/kyra/gui/gui_eob.cpp | 1 |
2 files changed, 12 insertions, 5 deletions
diff --git a/engines/kyra/engine/eobcommon.cpp b/engines/kyra/engine/eobcommon.cpp index e1d4a4a865..b59a13d2b1 100644 --- a/engines/kyra/engine/eobcommon.cpp +++ b/engines/kyra/engine/eobcommon.cpp @@ -636,11 +636,11 @@ void EoBCoreEngine::registerDefaultSettings() { void EoBCoreEngine::readSettings() { _configHpBarGraphs = ConfMan.getBool("hpbargraphs"); _configMouseBtSwap = ConfMan.getBool("mousebtswap"); - _configSounds = ConfMan.getBool("sfx_mute") ? 0 : 1; - _configMusic = _configSounds ? 1 : 0; + _configSounds = ConfMan.getBool("sfx_mute") ? 0 : 1; + _configMusic = (_flags.platform == Common::kPlatformPC98) ? (ConfMan.getBool("music_mute") ? 0 : 1) : (_configSounds ? 1 : 0); if (_sound) { - _sound->enableMusic(_configSounds ? 1 : 0); + _sound->enableMusic(_configMusic); _sound->enableSFX(_configSounds); } } @@ -649,11 +649,17 @@ void EoBCoreEngine::writeSettings() { ConfMan.setBool("hpbargraphs", _configHpBarGraphs); ConfMan.setBool("mousebtswap", _configMouseBtSwap); ConfMan.setBool("sfx_mute", _configSounds == 0); + if (_flags.platform == Common::kPlatformPC98) + ConfMan.setBool("music_mute", _configMusic == 0); if (_sound) { - if (!_configSounds) + if (_flags.platform == Common::kPlatformPC98) { + if (!_configMusic) + snd_playSong(0); + } else if (!_configSounds) { _sound->haltTrack(); - _sound->enableMusic(_configSounds ? 1 : 0); + } + _sound->enableMusic(_configMusic); _sound->enableSFX(_configSounds); } diff --git a/engines/kyra/gui/gui_eob.cpp b/engines/kyra/gui/gui_eob.cpp index 77fc28d6c3..558766d45b 100644 --- a/engines/kyra/gui/gui_eob.cpp +++ b/engines/kyra/gui/gui_eob.cpp @@ -2293,6 +2293,7 @@ void GUI_EoB::runCampMenu() { case 0x800D: if (_vm->gameFlags().platform == Common::kPlatformPC98) { _vm->_configMusic ^= true; + _vm->writeSettings(); if (_vm->_configMusic) _vm->snd_playSong(_vm->_currentLevel + 1); else |