summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2013-02-27 15:20:31 -0800
committerSam Lantinga <slouken@libsdl.org>2013-02-27 15:20:31 -0800
commit2f52fc2ff7dd89b5ecc6ccfd00f97311e27e6bbd (patch)
treedee592c75cda8990c56c088a2c5f60cd30e47b72
parent036c0b6cb6c1c8943b5fca5de244c53b2f4376ae (diff)
downloadsdl-baserock/morph.tar.gz
Allow "pulseaudio" as well as "pulse" so SDL 1.2 and 2.0 support both names for the pulseaudio driver.baserock/morph
-rw-r--r--src/audio/SDL_audio.c5
1 files changed, 5 insertions, 0 deletions
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;