Use pow() for all scale differences, which should make them much more correct, and...
[voretournament/voretournament.git] / voretournament-linux-glx.sh
index 0209704..a0b4f3a 100644 (file)
@@ -16,9 +16,9 @@ case "$(uname -m)" in
   *)           arch="linux32" ;;
 esac
 
-xonotic="xonotic-${arch}-${mode}"
+voretournament="voretournament-${arch}-${mode}"
 
-set -- ./${xonotic} "${@}"
+set -- ./${voretournament} "${@}"
 
 xserver=
 xlayout=
@@ -43,14 +43,14 @@ setdisplay()
 }
 
 # now how do we execute it?
-if [ -r ~/.xonotic/data/config.cfg ]; then
+if [ -r ~/.voretournament/data/config.cfg ]; then
        while read -r CMD KEY VALUE; do
                case "$CMD:$KEY" in
                        seta:vid_x11_display)
                                setdisplay "$VALUE"
                                ;;
                esac
-       done < ~/.xonotic/data/config.cfg
+       done < ~/.voretournament/data/config.cfg
 fi
 
 m=0
@@ -88,10 +88,10 @@ case "$xserver" in
                        # X server already exists
                        export DISPLAY=:$xserver
                        prefix="DISPLAY=:$xserver "
-                       msg=$msg$lf"- Running Xonotic on already existing display :$xserver"
+                       msg=$msg$lf"- Running VoreTournament on already existing display :$xserver"
                else
                        set -- startx "$@" -fullscreen -- ":$xserver"
-                       msg=$msg$lf"- Running Xonotic on a newly created X server :$xserver."
+                       msg=$msg$lf"- Running VoreTournament on a newly created X server :$xserver."
                        case "$xlayout" in
                                '')
                                        ;;
@@ -111,11 +111,20 @@ case "$xserver" in
                echo "Resulting command line:"
                echo "  $prefix$*"
                echo
-               echo "To undo these overrides, edit ~/.xonotic/data/config.cfg and remove the line"
+               echo "To undo these overrides, edit ~/.voretournament/data/config.cfg and remove the line"
                echo "starting with 'seta vid_x11_display'."
                echo
                echo
                ;;
 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 "$@"