shithub: rc

ref: 7f2e1ae8748df1fed378180929bdb203aae7f64c
dir: /bin/gba/

View raw version
#!/bin/rc
echo resize `{echo $vgasize |\
	awk -Fx '{
		a=$1/240;
		b=$2/160;
		c=int(b<a?b:a);
		if(c*240 == $1 || c*160 == $2)
			c--;
		print "-dx", c*240+8, "-dy", c*160+8
	}'
} >/dev/wctl
if(~ $1 -j)
	nusb/joy /dev/usb/ep^$2^.0 | joygba | {games/gba -a $*(3-) || games/gba $*(3-)}
if not
	games/gba -a $* || games/gba $*