#!/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
;;
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 "$@"