summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-08 21:32:30 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-08 21:32:30 +0300
commitfea3b4f151a78b7e05c3b042e0f9295c2f243d3b (patch)
tree55503f0d5c6eae6ac0836a1c5a92b537ec036a37 /src
parent1fcd75140b847a0e50584fc07fc47d90c9dd9fa8 (diff)
downloadplus-fea3b4f151a78b7e05c3b042e0f9295c2f243d3b.tar.gz
plus-fea3b4f151a78b7e05c3b042e0f9295c2f243d3b.tar.bz2
plus-fea3b4f151a78b7e05c3b042e0f9295c2f243d3b.tar.xz
plus-fea3b4f151a78b7e05c3b042e0f9295c2f243d3b.zip
Fix music fade out.
Diffstat (limited to 'src')
-rw-r--r--src/sound.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index a9157af1b..92a5eaa6f 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -67,6 +67,9 @@ Sound::~Sound()
config.removeListener("playBattleSound", this);
config.removeListener("playGuiSound", this);
config.removeListener("playMusic", this);
+
+ // Unlink the callback function.
+ Mix_HookMusicFinished(NULL);
}
void Sound::optionChanged(const std::string &value)
@@ -77,8 +80,6 @@ void Sound::optionChanged(const std::string &value)
mPlayGui = config.getBoolValue("playGuiSound");
else if (value == "playMusic")
mPlayMusic = config.getBoolValue("playMusic");
- // Unlink the callback function.
- Mix_HookMusicFinished(NULL);
}
void Sound::init()