Last active
June 1, 2016 13:10
-
-
Save bergamote/6767367 to your computer and use it in GitHub Desktop.
DirectInput to XInput for one or more Logitech Cordless Precision gamepad(s), using xboxdrv as suggested here: http://redd.it/1k1xe9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONFIG=" --evdev-absmap \ | |
ABS_X=x1,ABS_Y=y1,ABS_RZ=y2,ABS_Z=x2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y \ | |
--axismap -Y1=Y1,-Y2=Y2 \ | |
--evdev-keymap \ | |
BTN_X=y,BTN_C=b,BTN_A=x,BTN_B=a,BTN_TL2=back,BTN_TR2=start,BTN_MODE=guide,BTN_Y=lb,BTN_Z=rb,BTN_TL=lt,BTN_TR=rt,BTN_SELECT=tl,BTN_START=tr \ | |
--mimic-xpad --silent" | |
ls /dev/input/by-path | grep event-joystick | while read -r line ; do | |
xboxdrv --evdev /dev/input/by-path/$line $CONFIG & | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment