[Scummvm-cvs-logs] SF.net SVN: scummvm:[35301] scummvm/trunk/engines/tinsel/config.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Thu Dec 11 14:43:52 CET 2008
Revision: 35301
http://scummvm.svn.sourceforge.net/scummvm/?rev=35301&view=rev
Author: lordhoto
Date: 2008-12-11 13:43:52 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
Added a HACK/FIXME to prevent tinsel games from crashing, when for example the music volume is set to 256 via the launcher.
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/config.cpp
Modified: scummvm/trunk/engines/tinsel/config.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/config.cpp 2008-12-11 13:32:50 UTC (rev 35300)
+++ scummvm/trunk/engines/tinsel/config.cpp 2008-12-11 13:43:52 UTC (rev 35301)
@@ -98,9 +98,14 @@
if (ConfMan.hasKey("dclick_speed"))
dclickSpeed = ConfMan.getInt("dclick_speed");
- volMusic = ConfMan.getInt("music_volume");
- volSound = ConfMan.getInt("sfx_volume");
- volVoice = ConfMan.getInt("speech_volume");
+ // HACK/FIXME:
+ // We need to clip the volumes from [0, 256] to [0, 255]
+ // here, since for example Tinsel's internal options dialog
+ // and also the midi playback code rely on the volumes to be
+ // in [0, 255]
+ volMusic = CLIP(ConfMan.getInt("music_volume"), 0, 255);
+ volSound = CLIP(ConfMan.getInt("sfx_volume"), 0, 255);
+ volVoice = CLIP(ConfMan.getInt("speech_volume"), 0, 255);
if (ConfMan.hasKey("talkspeed"))
speedText = (ConfMan.getInt("talkspeed") * 100) / 255;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list