]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - xonotic-linux-glx.sh
add an experimental Makefile
[xonotic/xonotic.git] / xonotic-linux-glx.sh
index 020970497116e080a5a0946a88473139f953b8cd..346ff72b6bd2df6def3c12e9c2263ac6cb642557 100755 (executable)
@@ -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 "$@"