diff options
author | Sam Lantinga <slouken@libsdl.org> | 2013-02-27 15:20:31 -0800 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2013-02-27 15:20:31 -0800 |
commit | 2f52fc2ff7dd89b5ecc6ccfd00f97311e27e6bbd (patch) | |
tree | dee592c75cda8990c56c088a2c5f60cd30e47b72 | |
parent | 036c0b6cb6c1c8943b5fca5de244c53b2f4376ae (diff) | |
download | sdl-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.c | 5 |
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; |