2013-03-10 23:23:25 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-10-23 11:56:42 +02:00
|
|
|
if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
|
2014-11-12 16:15:39 +01:00
|
|
|
cat<<EOF
|
2013-06-25 22:56:10 +02:00
|
|
|
Usage: ${0##*/} WIN32EXE PARAMS"
|
|
|
|
|
|
|
|
Run Wine application while displaying FPS onscreen.
|
|
|
|
EOF
|
2014-11-12 16:15:39 +01:00
|
|
|
exit
|
2013-03-10 23:23:25 +01:00
|
|
|
fi
|
|
|
|
|
2013-10-27 19:50:23 +01:00
|
|
|
if ! command -v osd_cat >/dev/null; then
|
2014-11-12 16:15:39 +01:00
|
|
|
echo "You need osd_cat."
|
|
|
|
exit
|
2013-03-10 23:23:25 +01:00
|
|
|
fi
|
|
|
|
|
2013-10-23 11:56:42 +02:00
|
|
|
## The unbuffered option is -u on GNU and OpenBSD, -l on others.
|
|
|
|
OPT_UNBUF=-l
|
|
|
|
if [ "$(uname)" = "Linux" ] || [ "$(uname)" = "OpenBSD" ]; then
|
2014-11-12 16:15:39 +01:00
|
|
|
OPT_UNBUF=-u
|
2013-03-10 23:23:25 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
WINEDEBUG=fps wine "$@" 2>&1 | tee /dev/stderr | \
|
2014-11-12 16:15:39 +01:00
|
|
|
sed $OPT_UNBUF -n '/^trace:fps:/{s/.* \([^ ]*\)fps/\1/;p}' | \
|
|
|
|
osd_cat -l1 -f "-*-*-*-*-*-*-32-*-*-*-*-*-*-*" -O1 -c "yellow"
|