2015-10-05, 00:51
(2015-10-04, 04:31)garbear Wrote: The fixes for these (cefbc25) barely missed the last build. They'll be in the next one.
The fix was to change the add-on's input from game.controller.default to game.controller.gba:
Code:<import addon="game.controller.gba" version="1.0.0"/>
libretro only uses one type of input (the "RetroPad", also "joypad", basically a PS1 DualShock controller). This leads to ambiguity when mapping GBA buttons to the RetroPad.
Apparently, one developer thought L+R on a GBA mapped to L1 and R1. Another developer thought they mapped to L2 and R2. Thus, the breakage we saw.
To fix this, I added controller profiles to the Game API, so each platform receives input in the form it expects. To maintain compatibility with the libretro API, the libretro wrapper (game.libretro) uses a resources/buttonmap.xml file to map the buttons:
Code:<buttonmap>
<controller id="game.controller.gba" type="joypad">
<feature name="a" mapto="a"/>
<feature name="b" mapto="b"/>
<feature name="start" mapto="start"/>
<feature name="select" mapto="select"/>
<feature name="leftbumper" mapto="l"/>
<feature name="rightbumper" mapto="r"/>
<feature name="up" mapto="up"/>
<feature name="down" mapto="down"/>
<feature name="right" mapto="right"/>
<feature name="left" mapto="left"/>
</controller>
</buttonmap>
You can see that adding explicit instructions on how to map the L+R bumpers to the "l" and "r" buttons used by the core has fixed the ambiguity problem.
We only have 7 controllers available ATM: https://github.com/kodi-game/kodi-game-controllers . If another platform's libretro mapping is broken, help out by sending a PR for the new controller and it's libretro mapping!
I'm not programer savy, but you want me to make pull request on controllers that have that problem, and change the game.controller."system" L & R buttons to l & r? I do know some nes emulators have both the nes profile and the kodi one on the unused buttons...