aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2009-09-24 16:17:52 +0000
committerJohannes Schickel2009-09-24 16:17:52 +0000
commit9ab801bec68a93042cd9ba5ea962d7eab9df5a4a (patch)
tree0133eb67c6d8908ccbd7236220ad041a846ccd42
parente56dbf68be864d9617b01e72f55d93025a490893 (diff)
downloadscummvm-rg350-9ab801bec68a93042cd9ba5ea962d7eab9df5a4a.tar.gz
scummvm-rg350-9ab801bec68a93042cd9ba5ea962d7eab9df5a4a.tar.bz2
scummvm-rg350-9ab801bec68a93042cd9ba5ea962d7eab9df5a4a.zip
Fixed bug in Engine::flipMute, whiched prevent the game from being muted the first time flipMute is called, when there's no "mute" config entry.
svn-id: r44308
-rw-r--r--engines/engine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 11e46e893a..291f036c5a 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -343,7 +343,10 @@ void Engine::syncSoundSettings() {
}
void Engine::flipMute() {
- bool mute = false;
+ // Mute will be set to true by default here. This has two reasons:
+ // - if the game already has an "mute" config entry, it will be overwritten anyway.
+ // - if it does not have a "mute" config entry, the sound is unmuted currently and should be muted now.
+ bool mute = true;
if (ConfMan.hasKey("mute")) {
mute = !ConfMan.getBool("mute");