aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohannes Schickel2015-01-25 21:23:26 +0100
committerJohannes Schickel2015-01-25 21:23:26 +0100
commit99f4dafa72d497529fb7a15dcecb56fe3f717d37 (patch)
tree557b8eaa3af36b1ca59b77b992b3d749ed88f179 /backends
parent8d57b766a97f563d621db09176c0813efe5a1323 (diff)
downloadscummvm-rg350-99f4dafa72d497529fb7a15dcecb56fe3f717d37.tar.gz
scummvm-rg350-99f4dafa72d497529fb7a15dcecb56fe3f717d37.tar.bz2
scummvm-rg350-99f4dafa72d497529fb7a15dcecb56fe3f717d37.zip
SDL: Also print audio driver used when built with SDL2.
Diffstat (limited to 'backends')
-rw-r--r--backends/mixer/sdl/sdl-mixer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp
index fa363a7ad4..dc0c853808 100644
--- a/backends/mixer/sdl/sdl-mixer.cpp
+++ b/backends/mixer/sdl/sdl-mixer.cpp
@@ -57,13 +57,15 @@ void SdlMixerManager::init() {
error("Could not initialize SDL: %s", SDL_GetError());
}
-#if !SDL_VERSION_ATLEAST(2, 0, 0)
+#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);
- debug(1, "Using SDL Audio Driver \"%s\"", sdlDriverName);
#endif
+ debug(1, "Using SDL Audio Driver \"%s\"", sdlDriverName);
// Get the desired audio specs
SDL_AudioSpec desired = getAudioSpec(SAMPLES_PER_SEC);