aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorTorbjörn Andersson2008-07-24 22:12:48 +0000
committerTorbjörn Andersson2008-07-24 22:12:48 +0000
commit6b2337740ecdce2bcc7053568c5b232845be75ff (patch)
tree56dae547e5e64b225538ecff31dbecf5f263bb18 /engines/kyra
parent728a045308e62579262bcf50d11fd5c37b6e26e0 (diff)
downloadscummvm-rg350-6b2337740ecdce2bcc7053568c5b232845be75ff.tar.gz
scummvm-rg350-6b2337740ecdce2bcc7053568c5b232845be75ff.tar.bz2
scummvm-rg350-6b2337740ecdce2bcc7053568c5b232845be75ff.zip
Make sure _musicVolume and _sfxVolume are clipped to fit in a byte.
svn-id: r33266
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/sound.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 5068268d99..c8749dc06b 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -202,8 +202,8 @@ bool SoundMidiPC::init() {
}
void SoundMidiPC::updateVolumeSettings() {
- _musicVolume = ConfMan.getInt("music_volume");
- _sfxVolume = ConfMan.getInt("sfx_volume");
+ _musicVolume = CLIP(ConfMan.getInt("music_volume"), 0, 255);
+ _sfxVolume = CLIP(ConfMan.getInt("sfx_volume"), 0, 255);
updateChannelVolume(_musicVolume);
}