diff options
Diffstat (limited to 'src/soundmanager.cpp')
-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/")) |