summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-09 16:24:15 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-09 16:24:15 +0300
commitd3d879ac07ac45a623365b4db28c3b120a7bbb25 (patch)
treea03c7b76df1f864e01104b95503b668d64ce9882
parent59c83475acece84c03f28b2f1aa73a24d2a972f8 (diff)
downloadmv-d3d879ac07ac45a623365b4db28c3b120a7bbb25.tar.gz
mv-d3d879ac07ac45a623365b4db28c3b120a7bbb25.tar.bz2
mv-d3d879ac07ac45a623365b4db28c3b120a7bbb25.tar.xz
mv-d3d879ac07ac45a623365b4db28c3b120a7bbb25.zip
disable fadeout music actions if music disabled.
-rw-r--r--src/soundmanager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp
index c7328b78f..2a3f362b7 100644
--- a/src/soundmanager.cpp
+++ b/src/soundmanager.cpp
@@ -293,6 +293,9 @@ void SoundManager::fadeInMusic(const std::string &fileName, const int ms)
void SoundManager::fadeOutMusic(const int ms)
{
+ if (!mPlayMusic)
+ return;
+
mCurrentMusicFile.clear();
if (!mInstalled)
@@ -317,6 +320,9 @@ void SoundManager::fadeOutMusic(const int ms)
void SoundManager::fadeOutAndPlayMusic(const std::string &fileName,
const int ms)
{
+ if (!mPlayMusic)
+ return;
+
mNextMusicFile = fileName;
fadeOutMusic(ms);
}