kodi-game / game.libretro

Libretro compatibility layer for the Kodi Game API
GNU General Public License v2.0
37 stars 26 forks source link

Game API v1.0.35: Mouse mapping support #30

Closed garbear closed 6 years ago

garbear commented 6 years ago

This PR allows mouse input to be mapped from a controller profile to libretro input. A sample buttonmap looks like:

<buttonmap version="2">
  <controller id="game.controller.mouse" type="RETRO_DEVICE_MOUSE">
    <feature name="left" mapto="RETRO_DEVICE_ID_MOUSE_LEFT"/>
    <feature name="right" mapto="RETRO_DEVICE_ID_MOUSE_RIGHT"/>
    <feature name="middle" mapto="RETRO_DEVICE_ID_MOUSE_MIDDLE"/>
    <feature name="wheelup" mapto="RETRO_DEVICE_ID_MOUSE_WHEELUP"/>
    <feature name="wheeldown" mapto="RETRO_DEVICE_ID_MOUSE_WHEELDOWN"/>
    <feature name="horizwheelup" mapto="RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP"/>
    <feature name="horizwheeldown" mapto="RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN"/>
    <feature name="pointer" mapto="RETRO_DEVICE_MOUSE"/>
  </controller>
</buttonmap>

Corresponds to https://github.com/xbmc/xbmc/pull/13482