I realized yesterday that even with an original Xbox controller plugged into Raspberry Pi 3 (my brother has one and I did tests), it automatically detects, works OK in emulationStation and games, but: inside the kodi, it's the same thing. . It does not work well (directional do not work ... nor analog) ... so I took a mouse to use the kodi, I went in the control settings attached and I configured all the buttons ... it worked very well! ... but after leaving the kodi and entering again, settings lost and the problem returns ..... I tried to do the same thing and after some difficulty, I was also able to manually configure my control Xbom (generic USB DragonRise) ... It worked also, however, same problem .. on entering again, the settings are lost ....
It seems that something is problematic in generating the Kodi configuration file that is done by the script ... in my opinion, I may be wrong, but it seems that not all buttons are generated in the file!
Note that: in the file generated by the system, there are no directional buttons, up, down, right, left etc ... when I manually set it however, I got these results in XML:
"<?xml version="1.0" ?>
<buttonmap>
<device name="DragonRise Inc. Generic USB Joystick " provider="linux" buttoncount="12" axiscount="5">
<configuration>
<axis index="0" ignore="true" />
<axis index="1" ignore="true" />
</configuration>
<controller id="game.controller.default">
<feature name="back" button="8" />
<feature name="down" axis="+1" />
<feature name="left" axis="-0" />
<feature name="leftbumper" button="4" />
<feature name="leftstick">
<up button="0" />
<down button="2" />
<right button="1" />
<left button="3" />
</feature>
<feature name="leftthumb" button="10" />
<feature name="lefttrigger" button="6" />
<feature name="right" axis="+0" />
<feature name="rightbumper" button="5" />
<feature name="rightthumb" button="11" />
<feature name="righttrigger" button="7" />
<feature name="start" button="9" />
<feature name="up" axis="-1" />
</controller>
</device>
</buttonmap>