diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-01 01:15:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-01 01:15:01 +0300 |
commit | 5cf2b1abffc97e6d0d79dec6088a3b59e07bc490 (patch) | |
tree | 3a0c66dcc05a22078be4182dc0f0c3a1247e500f | |
parent | 4960f1bd01889d04915b76837dfc3f74ef07ac79 (diff) | |
download | plus-5cf2b1abffc97e6d0d79dec6088a3b59e07bc490.tar.gz plus-5cf2b1abffc97e6d0d79dec6088a3b59e07bc490.tar.bz2 plus-5cf2b1abffc97e6d0d79dec6088a3b59e07bc490.tar.xz plus-5cf2b1abffc97e6d0d79dec6088a3b59e07bc490.zip |
Dont try to play gui sound if it empty.
-rw-r--r-- | src/soundmanager.cpp | 11 |
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/")) |