summaryrefslogtreecommitdiff
path: root/src/sound.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-03 19:55:32 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-03 19:55:32 +0000
commitf181b3373ffd460d241d73ca68d884ee1d11d8ca (patch)
tree4c17758417f7660fac44ad2d583ef9b073d5769b /src/sound.cpp
parent3824dd81d198821a78d611c4223a13040ee8f121 (diff)
downloadmana-client-f181b3373ffd460d241d73ca68d884ee1d11d8ca.tar.gz
mana-client-f181b3373ffd460d241d73ca68d884ee1d11d8ca.tar.bz2
mana-client-f181b3373ffd460d241d73ca68d884ee1d11d8ca.tar.xz
mana-client-f181b3373ffd460d241d73ca68d884ee1d11d8ca.zip
Added playing hardcoded background song during login, stops when game starts.
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index 8de4077e..0013cb21 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -85,7 +85,12 @@ void Sound::startBgm(char *in, int loop)
logger.log("Sound::startBgm() playing \"%s\" %d times", in, loop);
bgm = Mix_LoadMUS(in);
- Mix_PlayMusic(bgm, loop);
+ if (bgm) {
+ Mix_PlayMusic(bgm, loop);
+ }
+ else {
+ logger.log("Sound::startBgm() warning: error loading file.");
+ }
}
void Sound::stopBgm()