[Scummvm-cvs-logs] SF.net SVN: scummvm:[52828] scummvm/branches/branch-1-2-0/engines/sword1/ sword1.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Mon Sep 20 22:38:34 CEST 2010
Revision: 52828
http://scummvm.svn.sourceforge.net/scummvm/?rev=52828&view=rev
Author: sev
Date: 2010-09-20 20:38:34 +0000 (Mon, 20 Sep 2010)
Log Message:
-----------
SWORD1: Backport fix for bug #3032772
Modified Paths:
--------------
scummvm/branches/branch-1-2-0/engines/sword1/sword1.cpp
Modified: scummvm/branches/branch-1-2-0/engines/sword1/sword1.cpp
===================================================================
--- scummvm/branches/branch-1-2-0/engines/sword1/sword1.cpp 2010-09-20 20:37:34 UTC (rev 52827)
+++ scummvm/branches/branch-1-2-0/engines/sword1/sword1.cpp 2010-09-20 20:38:34 UTC (rev 52828)
@@ -214,12 +214,20 @@
sfxVolL = 255;
}
- _music->setVolume(musicVolL, musicVolR);
- _sound->setSpeechVol(speechVolL, speechVolR);
- _sound->setSfxVol(sfxVolL, sfxVolR);
+ bool mute = ConfMan.getBool("mute");
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
+ if (mute) {
+ _music->setVolume(0, 0);
+ _sound->setSpeechVol(0, 0);
+ _sound->setSfxVol(0, 0);
+ } else {
+ _music->setVolume(musicVolL, musicVolR);
+ _sound->setSpeechVol(speechVolL, speechVolR);
+ _sound->setSfxVol(sfxVolL, sfxVolR);
+ }
+
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, mute ? 0 : ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, mute ? 0 : ConfMan.getInt("speech_volume"));
}
void SwordEngine::flagsToBool(bool *dest, uint8 flags) {
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