From 933a93e4a71591e867182999a7daf8ae3bad5596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Fri, 15 Feb 2013 12:34:32 +0100 Subject: Major overhaul: Support non-wine games * Moved wine support to own template * Added xpad template * Added no-x template for games that don't support being started on another X. * Improved ways template functions work together: - EXPORT now appends - OVERRIDE replaces all the others - in game: command 'super' to call the phases of the templates - super supports "-r tpl" to remove the phase function of tpl --- templates/xpad | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 templates/xpad (limited to 'templates/xpad') diff --git a/templates/xpad b/templates/xpad new file mode 100644 index 0000000..1e67429 --- /dev/null +++ b/templates/xpad @@ -0,0 +1,21 @@ +xpad_prepare () { + declare -g XBOX_PID XBOX_DEADZONE XBOX_UIAXISMAP \ + XBOX_UIBUTTONMAP XBOX_NO_FF + + local args="--silent \ + --deadzone ${XBOX_DEADZONE:-4000}" + + [[ -n $XBOX_UIAXISMAP ]] && args+=" --ui-axismap $XBOX_UIAXISMAP" + [[ -n $XBOX_UIBUTTONMAP ]] && args+=" --ui-buttonmap $XBOX_UIBUTTONMAP" + [[ -z $XBOX_NO_FF ]] || args+=" --force-feedback" + + exc -b xboxdrv ${=args} + XBOX_PID=$! +} + +xpad_cleanup () { + [[ -n $XBOX_PID ]] && exc kill -SIGINT $XBOX_PID +} + +EXPORT prepare cleanup +# vim:ft=sh -- cgit v1.2.3