#!/bin/sh
#
# configure MPlayer's video settings
#
# runlevels: geexbox, debug, configure

echo "### Configuring MPlayer's video settings ###"

. /settings

RES=`/usr/sbin/fbset | sed -n 's/mode "\(.*\)-.*"/\1/p'`
RESX=`echo $RES | cut -f1 -dx`
RESY=`echo $RES | cut -f2 -dx`

mp_set_option screenw "$RESX"
mp_set_option screenh "$RESY"
mp_set_option vf "scale=1:1:1" concat
mp_set_option vf "expand=$RESX:$RESY:-1:-1:1" concat

[ -z "$MONITORASPECT" ] && MONITORASPECT=1
mp_set_option monitoraspect "$MONITORASPECT"

if [ "$VSYNC" = yes ]; then
  mp_set_option vsync yes
fi

exit 0
