From d9514097846381cd30fe08df65dbdd48de92a058 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 27 Feb 2013 15:20:31 -0800 Subject: [PATCH] Allow "pulseaudio" as well as "pulse" so SDL 1.2 and 2.0 support both names for the pulseaudio driver. --- src/audio/SDL_audio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c index b59033a72..9babb9174 100644 --- a/src/audio/SDL_audio.c +++ b/src/audio/SDL_audio.c @@ -310,6 +310,11 @@ int SDL_AudioInit(const char *driver_name) SDL_AudioQuit(); } + /* SDL 2.0 uses the name "pulseaudio", so we'll support both */ + if ( driver_name && SDL_strcasecmp(driver_name, "pulseaudio") == 0 ) { + driver_name = "pulse"; + } + /* Select the proper audio driver */ audio = NULL; idx = 0;