From b1fab9807bc9fc72573da82e42920ac14e7e4e6c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 15 Aug 2016 03:14:04 +0300 Subject: Not stop background music if not connected to server and settings was changed. --- src/gui/widgets/tabs/setup_audio.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2