• 1
  • 22
  • 23
  • 24
  • 25
  • 26(current)
Input
In Kodi v16 deadzone settings used to be only in advancedsettings.xml, so anything in the GUI is a huge improvement :D
Reply
I've added the ability for Kodi to "derive" button maps. As a result, you don't have to configure your controller for every platform - just a single one.

Kodi uses statistics from its button map database about how features correspond between different controller profiles to predict a mapping for the desired platform. For example, I mapped a physical SNES controller to the SNES profile and created the following mapping in the controller configuration GUI:

Code:
<controller id="game.controller.snes">
    <feature name="a" button="0" />
    <feature name="b" button="1" />
    <feature name="down" button="14" />
    <feature name="left" button="11" />
    <feature name="leftbumper" button="4" />
    <feature name="right" button="12" />
    <feature name="rightbumper" button="5" />
    <feature name="select" button="6" />
    <feature name="start" button="7" />
    <feature name="up" button="13" />
    <feature name="x" button="2" />
    <feature name="y" button="3" />
</controller>

The controller was immediately usable to navigate the GUI, even though Kodi uses the "Kodi" profile which hasn't been mapped. Upon inspection, this was the button map that Kodi generated for the default controller:

Code:
<controller id="game.controller.default">
    <feature name="a" button="1" />
    <feature name="b" button="0" />
    <feature name="back" button="6" />
    <feature name="down" button="14" />
    <feature name="left" button="11" />
    <feature name="leftbumper" button="4" />
    <feature name="right" button="12" />
    <feature name="rightbumper" button="5" />
    <feature name="start" button="7" />
    <feature name="up" button="13" />
    <feature name="x" button="3" />
    <feature name="y" button="2" />
</controller>

You can see that Kodi got most of the buttons right. Up, down, left, right, start and the shoulders are the same for both profiles. It also correctly mapped the snes's Select to the default controller's Back.

What is interesting is that it swapped A and B, X and Y. This is because more button maps in our database use the physical mapping instead of the logical mapping.

I got a little curious. How would a N64 controller look if it was derived from a dreamcast mapping? First, I generated the dreamcast mapping using the configuration GUI:

Code:
<controller id="game.controller.dreamcast">
    <feature name="a" button="0" />
    <feature name="analogstick">
        <up axis="-1" />
        <down axis="+1" />
        <right axis="+0" />
        <left axis="-0" />
    </feature>
    <feature name="b" button="1" />
    <feature name="down" button="14" />
    <feature name="left" button="11" />
    <feature name="lefttrigger" axis="+2" />
    <feature name="right" button="12" />
    <feature name="righttrigger" axis="+5" />
    <feature name="start" button="7" />
    <feature name="up" button="13" />
    <feature name="x" button="2" />
    <feature name="y" button="3" />
</controller>

Then I loaded up a N64 game. Here's what Kodi derived:

Code:
<controller id="game.controller.n64">
    <feature name="a" button="0" />
    <feature name="analogstick">
        <up axis="-1" />
        <down axis="+1" />
        <right axis="+0" />
        <left axis="-0" />
    </feature>
    <feature name="b" button="2" />
    <feature name="cleft" button="3" />
    <feature name="down" button="14" />
    <feature name="left" button="11" />
    <feature name="leftbumper" axis="+2" />
    <feature name="right" button="12" />
    <feature name="rightbumper" axis="+5" />
    <feature name="start" button="7" />
    <feature name="up" button="13" />
</controller>

It got the analog stick right! Note how the X on the dreamcast becomes the B on the N64, again reflecting the physical mapping instead of the logical one. It derived C-Left from Y, but C-Down (should be X I guess) is mysteriously missing. Guess I still got some work to do.
Reply
I've added Udev support on linux. Udev uses different button orders than the Linux Joystick API, so button maps will need to be made anew.

If you create a udev button map, upload it here so I can include it in the new builds!
Reply
  • 1
  • 22
  • 23
  • 24
  • 25
  • 26(current)

Logout Mark Read Team Forum Stats Members Help
Input3