From cb50bdc0752b428804f2013f89200efeae5f9540 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 21 Jun 2013 09:21:58 +0000 Subject: [PATCH] Fix Unix build with libSDL 2 in debug mode. SDL_AudioDriverName() was replaced with SDL_GetCurrentAudioDriver() in SDL v2. Closes #15271. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/sound_sdl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/unix/sound_sdl.cpp b/src/unix/sound_sdl.cpp index 3962e6dc72..e7e847af5c 100644 --- a/src/unix/sound_sdl.cpp +++ b/src/unix/sound_sdl.cpp @@ -213,7 +213,11 @@ bool wxSoundBackendSDL::OpenAudio() { #if wxUSE_LOG_DEBUG char driver[256]; +#if SDL_MAJOR_VERSION == 1 SDL_AudioDriverName(driver, 256); +#elif SDL_MAJOR_VERSION > 1 + strncpy(driver, SDL_GetCurrentAudioDriver(), 256); +#endif wxLogTrace(wxT("sound"), wxT("opened audio, driver '%s'"), wxString(driver, wxConvLocal).c_str()); #endif -- 2.45.2