]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - xonotic-linux-glx.sh
Disable hotfix and set new recommended servers
[xonotic/xonotic.git] / xonotic-linux-glx.sh
index 020970497116e080a5a0946a88473139f953b8cd..4ef3d03030318a37fe05ba54b6ae3a3a62b56bfd 100755 (executable)
@@ -1,12 +1,13 @@
 #!/bin/sh
 
 path=`dirname "${0}"`
-link=`readlink "${0}"`
+link=`readlink -f "${0}"`
 
 [ -n "${link}" ] && path=`dirname "${link}"`
 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 "$@"