aboutsummaryrefslogtreecommitdiff
path: root/backends/mixer/sdl/sdl-mixer.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-10-12 15:18:03 -0400
committerPaul Gilbert2015-10-12 15:18:03 -0400
commitb0016071ecf3f5ffbc6f1619af610ab648bbba3a (patch)
treef00f6b17bfd3475200e454cdfc09eba94d764f01 /backends/mixer/sdl/sdl-mixer.cpp
parent652a6623156b6c6bba8ca49e038945fd0c2b7780 (diff)
parentfbcf667b6a57593a2b85622ad1e1380c8aef7210 (diff)
downloadscummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.tar.gz
scummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.tar.bz2
scummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.zip
Merge branch 'msvc_2015' into xeen
Diffstat (limited to 'backends/mixer/sdl/sdl-mixer.cpp')
-rw-r--r--backends/mixer/sdl/sdl-mixer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp
index e3b15b8c59..dc0c853808 100644
--- a/backends/mixer/sdl/sdl-mixer.cpp
+++ b/backends/mixer/sdl/sdl-mixer.cpp
@@ -57,10 +57,14 @@ void SdlMixerManager::init() {
error("Could not initialize SDL: %s", SDL_GetError());
}
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ const char *sdlDriverName = SDL_GetCurrentAudioDriver();
+#else
const int maxNameLen = 20;
char sdlDriverName[maxNameLen];
sdlDriverName[0] = '\0';
SDL_AudioDriverName(sdlDriverName, maxNameLen);
+#endif
debug(1, "Using SDL Audio Driver \"%s\"", sdlDriverName);
// Get the desired audio specs