#89925
juicebag85
Participant

Damn…

So I created a xboxdrvcfg.ini with the following content:

[xboxdrv]
silent=true
deadzone=6000
dpad-as-button=true
trigger-as-button=true

[ui-buttonmap]
a=KEY_RIGHTSHIFT
b=KEY_F1
x=KEY_F4
y=KEY_F5

[ui-buttonmap]
lb=KEY_TAB
rb=KEY_SPACE

[ui-buttonmap]
lt=KEY_F9
rt=BTN_LEFT

[ui-buttonmap]
dl=KEY_NUM4
dr=KEY_NUM6
du=KEY_NUM8
dd=KEY_NUM5

[ui-buttonmap]
back=KEY_ESC
start=KEY_ENTER

# EOF #

and saved it at /usr/local/bin/

Then I edited the /etc/default/xboxdrv to:

# How many Controllers? (support up to 4 Controllers)
CONTROLLER_NUM=1

case $CONTROLLER_NUM in
    1) CONTROLLER="-w 0 -l 2 --config /usr/local/bin/xboxdrvcfg.ini"
    ;;
    2) CONTROLLER="-w 0 -l 2 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 1 -l 3 --config /usr/local/bin/xboxdrvcfg.ini"
    ;;
    3) CONTROLLER="-w 0 -l 2 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 1 -l 3 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 2 -l 4 --config /usr/local/bin/xboxdrvcfg.ini"
    ;;
    4) CONTROLLER="-w 0 -l 2 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 1 -l 3 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 2 -l 4 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 3 -l 5 --config /usr/local/bin/xboxdrvcfg.ini"
    ;;
    *) CONTROLLER="incorrect amount of controller specified"
    ;;
esac

but everytime I boot the Pi I get the following error:

[....] Starting XBOX Controller Service: xboxdrv
-- [ERROR] -----------------------------------------------
/usr/local/bin/xboxdrvcfg.ini:1:0: error: expected newline
. ok

Any ideas what this could mean?