summaryrefslogtreecommitdiff
path: root/src/soundmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-01 01:15:01 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-01 01:15:01 +0300
commit5cf2b1abffc97e6d0d79dec6088a3b59e07bc490 (patch)
tree3a0c66dcc05a22078be4182dc0f0c3a1247e500f /src/soundmanager.cpp
parent4960f1bd01889d04915b76837dfc3f74ef07ac79 (diff)
downloadmv-5cf2b1abffc97e6d0d79dec6088a3b59e07bc490.tar.gz
mv-5cf2b1abffc97e6d0d79dec6088a3b59e07bc490.tar.bz2
mv-5cf2b1abffc97e6d0d79dec6088a3b59e07bc490.tar.xz
mv-5cf2b1abffc97e6d0d79dec6088a3b59e07bc490.zip
Dont try to play gui sound if it empty.
Diffstat (limited to 'src/soundmanager.cpp')
-rw-r--r--src/soundmanager.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp
index 004cfacdf..c2f522d3e 100644
--- a/src/soundmanager.cpp
+++ b/src/soundmanager.cpp
@@ -483,14 +483,21 @@ void SoundManager::playSfx(const std::string &path,
void SoundManager::playGuiSound(const std::string &name)
{
+ const std::string sound = config.getStringValue(name);
+ if (sound == "(no sound)")
+ return;
playGuiSfx(branding.getStringValue("systemsounds").append(
- config.getStringValue(name)).append(".ogg"));
+ sound).append(".ogg"));
}
void SoundManager::playGuiSfx(const std::string &path)
{
- if (!mInstalled || path.empty() || !mPlayGui)
+ if (!mInstalled ||
+ !mPlayGui ||
+ path.empty())
+ {
return;
+ }
std::string tmpPath;
if (!path.compare(0, 4, "sfx/"))