X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=xonotic-linux-glx.sh;h=346ff72b6bd2df6def3c12e9c2263ac6cb642557;hp=020970497116e080a5a0946a88473139f953b8cd;hb=1565485f10b633dbaa0e3283c0a515a6ddccd69c;hpb=7a8e91cdc377e7a7407f34a85a515e6a7986f3f2 diff --git a/xonotic-linux-glx.sh b/xonotic-linux-glx.sh index 02097049..346ff72b 100755 --- a/xonotic-linux-glx.sh +++ b/xonotic-linux-glx.sh @@ -7,6 +7,7 @@ link=`readlink "${0}"` cd "${path}" case "${0##*/}" in + *dedicated*) mode="dedicated" ;; *sdl*) mode="sdl" ;; *) mode="glx" ;; esac @@ -118,4 +119,13 @@ case "$xserver" in ;; esac +# if pulseaudio +if [ -z "$SDL_AUDIODRIVER" ]; then + if ps -C pulseaudio >/dev/null; then + if ldd /usr/lib/libSDL.so 2>/dev/null | grep pulse >/dev/null; then + export SDL_AUDIODRIVER=pulse + fi + fi +fi + exec "$@"