diff options
author | Max Horn | 2005-02-06 20:31:20 +0000 |
---|---|---|
committer | Max Horn | 2005-02-06 20:31:20 +0000 |
commit | 86370fa544a0fad0d45dc938b2986c0e80add289 (patch) | |
tree | d34e30859c96af8875ef69e09c4f17fd4e02a5c0 /sword1 | |
parent | 490bba8ecb318f8fd252296b79eee853615cda2f (diff) | |
download | scummvm-rg350-86370fa544a0fad0d45dc938b2986c0e80add289.tar.gz scummvm-rg350-86370fa544a0fad0d45dc938b2986c0e80add289.tar.bz2 scummvm-rg350-86370fa544a0fad0d45dc938b2986c0e80add289.zip |
BS1 specific fix for bug #1107121 (ALL/SFX: Setting the SFX volume at 256 mutes sound)
svn-id: r16746
Diffstat (limited to 'sword1')
-rw-r--r-- | sword1/sword1.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp index 6be538516e..9ea9d3e4a9 100644 --- a/sword1/sword1.cpp +++ b/sword1/sword1.cpp @@ -176,9 +176,15 @@ int SwordEngine::init(GameDetector &detector) { _logic = new Logic(_objectMan, _resMan, _screen, _mouse, _sound, _music, _menu, _system, _mixer); _mouse->useLogicAndMenu(_logic, _menu); - uint8 musicVol = (uint8)ConfMan.getInt("music_volume"); - uint8 speechVol = (uint8)ConfMan.getInt("speech_volume"); - uint8 sfxVol = (uint8)ConfMan.getInt("sfx_volume"); + uint musicVol = ConfMan.getInt("music_volume"); + uint speechVol = ConfMan.getInt("speech_volume"); + uint sfxVol = ConfMan.getInt("sfx_volume"); + if (musicVol > 255) + musicVol = 255; + if (speechVol > 255) + speechVol = 255; + if (sfxVol > 255) + sfxVol = 255; _music->setVolume(musicVol, musicVol); // these routines expect left and right volume, _sound->setSpeechVol(speechVol, speechVol); // but our config manager doesn't support it. |