summaryrefslogtreecommitdiff
path: root/src/soundmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/soundmanager.cpp')
-rw-r--r--src/soundmanager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp
index 72a7d26c2..8575edd2b 100644
--- a/src/soundmanager.cpp
+++ b/src/soundmanager.cpp
@@ -165,7 +165,6 @@ void SoundManager::init()
void SoundManager::info() const
{
SDL_version compiledVersion;
- char driver[40] = "Unknown";
const char *format = "Unknown";
int rate = 0;
uint16_t audioFormat = 0;
@@ -174,7 +173,12 @@ void SoundManager::info() const
MIX_VERSION(&compiledVersion);
const SDL_version *const linkedVersion = Mix_Linked_Version();
+#ifdef USE_SDL2
+ const char *driver = SDL_GetCurrentAudioDriver();
+#else
+ char driver[40] = "Unknown";
SDL_AudioDriverName(driver, 40);
+#endif
Mix_QuerySpec(&rate, &audioFormat, &channels);
switch (audioFormat)