summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-03-18 20:27:27 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-03-18 20:27:27 +0100
commitb3b7a6763ed8d16397965db50a1197f78aaec65a (patch)
tree63de5720d3bff8a15d03fe4ac30e12ed8cc5b260 /src/resources
parentbce577e663e28e1942fda371235eba091a6ea8e2 (diff)
parent3ce3e5876c69495bfa5a7f7d326a3ff849f2f1f5 (diff)
downloadmana-client-b3b7a6763ed8d16397965db50a1197f78aaec65a.tar.gz
mana-client-b3b7a6763ed8d16397965db50a1197f78aaec65a.tar.bz2
mana-client-b3b7a6763ed8d16397965db50a1197f78aaec65a.tar.xz
mana-client-b3b7a6763ed8d16397965db50a1197f78aaec65a.zip
Merge branch '0.6'
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/music.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/resources/music.cpp b/src/resources/music.cpp
index 6a87bb63..73ef2f85 100644
--- a/src/resources/music.cpp
+++ b/src/resources/music.cpp
@@ -35,6 +35,9 @@ Music::~Music()
Resource *Music::load(SDL_RWops *rw)
{
+#if SDL_MIXER_MAJOR_VERSION >= 1 &&\
+ SDL_MIXER_MINOR_VERSION >= 2 &&\
+ SDL_MIXER_PATCHLEVEL >= 9
if (Mix_Music *music = Mix_LoadMUS_RW(rw))
{
return new Music(music);
@@ -44,6 +47,10 @@ Resource *Music::load(SDL_RWops *rw)
logger->log("Error, failed to load music: %s", Mix_GetError());
return 0;
}
+#else
+ SDL_FreeRW(rw);
+ return 0;
+#endif
}
bool Music::play(int loops, int fadeIn)