2015-10-04, 04:31
(2015-10-03, 00:34)Heat Wrote: VBA-M does not detect the L & R buttons.
debug log: http://paste.ubuntu.com/12641814/
VBA-Next doesn't detect L&R.
debug log: http://paste.ubuntu.com/12642046/
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!