Shell: winefps function to monitor FPS in all Wine games.

master
Pierre Neidhardt 2013-03-08 23:47:09 +01:00
parent 5e37c7592f
commit 47f5b774d4
1 changed files with 23 additions and 0 deletions

View File

@ -403,6 +403,29 @@ webdl ()
movgrab -f webm:$RES "$2"
}
## Wine FPS monitor
winefps ()
{
if [ $# -ne 1 ]; then
echo "Usage: ${0##*/} WIN32EXE"
return
fi
if [ -z "$(command -v osd_cat)" ]; then
echo "You must have osd_cat."
return
fi
if [ -z "$(sed --version | grep "GNU")" ]; then
echo "You must have GNU sed."
return
fi
WINEDEBUG=fps wine "$1" 2>&1 | tee /dev/stderr | \
sed -un '/^trace:fps:/{s/.* \([^ ]*\)fps/\1/;p}' | \
osd_cat -l1 -f "-*-*-*-*-*-*-32-*-*-*-*-*-*-*" -O1 -c "yellow"
}
##==============================================================================
## Pacman functions