diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-15 03:14:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-15 03:14:04 +0300 |
commit | b1fab9807bc9fc72573da82e42920ac14e7e4e6c (patch) | |
tree | 26b27648f35e037097817c3712e36ad134851b2d /src | |
parent | 5fab1f9cd887c12ffcf129392582d634649c0122 (diff) | |
download | mv-b1fab9807bc9fc72573da82e42920ac14e7e4e6c.tar.gz mv-b1fab9807bc9fc72573da82e42920ac14e7e4e6c.tar.bz2 mv-b1fab9807bc9fc72573da82e42920ac14e7e4e6c.tar.xz mv-b1fab9807bc9fc72573da82e42920ac14e7e4e6c.zip |
Not stop background music if not connected to server and settings was changed.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/widgets/tabs/setup_audio.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/gui/widgets/tabs/setup_audio.cpp b/src/gui/widgets/tabs/setup_audio.cpp index d6fc4e616..af23ad2fe 100644 --- a/src/gui/widgets/tabs/setup_audio.cpp +++ b/src/gui/widgets/tabs/setup_audio.cpp @@ -179,13 +179,23 @@ void Setup_Audio::apply() if (config.getBoolValue("sound")) { soundManager.init(); - if (viewport && config.getBoolValue("playMusic")) + if (config.getBoolValue("playMusic")) { - const Map *const map = viewport->getMap(); - if (map) - { - soundManager.playMusic(map->getMusicFile(), - SkipError_false); + if (viewport) + { // in game + const Map *const map = viewport->getMap(); + if (map) + { + soundManager.playMusic(map->getMusicFile(), + SkipError_false); + } + } + else + { // not in game + soundManager.playMusic(branding.getValue( + "loginMusic", + "keprohm.ogg"), + SkipError_true); } } else |