Kodi Community Forum
Difference between joystick.xml and gamepad.xml - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Game support (https://forum.kodi.tv/forumdisplay.php?fid=292)
+--- Thread: Difference between joystick.xml and gamepad.xml (/showthread.php?tid=338454)



Difference between joystick.xml and gamepad.xml - Wintermute0110 - 2018-12-17

I have been looking at the wiki but I cannot find what's the difference between joystick.xml and gamepad.xml. Both files seem to have the same purpose. Can someone explain what's the difference and purpose of each file?

For reference, link to default joystick.xml in Leia, link to default gamepad.xml in Leia.


RE: Difference between joystick.xml and gamepad.xml - tjay260476 - 2018-12-17

they have the same purpose, but for different devices.

If you plug a joystick into Kodi, then that will use joystick.xml. Joysticks are popular in most arcade games and early 80's computers like the Commodore 64. 

If you plug in a gamepad, with your usual D-Pad layout then Kodi will use the settings in gamepad.xml.

But it is possible to use these vice versa, depending on the emulator/game etc.


RE: Difference between joystick.xml and gamepad.xml - Wintermute0110 - 2018-12-18

@tjay260476 Thanks for your help. How do I know if a controller is a joystick or a gamepad? I have not seen any such differentiation in the settings...


RE: Difference between joystick.xml and gamepad.xml - tjay260476 - 2018-12-18

The XML files are there to map the physical devices to Kodi, so that you can play the games using either/or.  

During the early days of XBMC, it was able to use different controllers, so you have keyboard.xml as well as ones for remotes (such as the Microsoft MCE remote) and games controllers. 

Kodi, 'I think' can differentiate between them, making multi controllers in Kodi a lot easier to use... but I might be wrong!


RE: Difference between joystick.xml and gamepad.xml - DarrenHill - 2018-12-18

The actual file name in there doesn't matter, as long as it's a valid XML file containing the right information. They're only seperated and called keyboard.xml, joystick.xml and gamepad.xml etc for simplicity of identifying what the tags inside actually refer to. But you could theoretically merge them all together, call it input.xml (or bigfathairyinputfile.xml should you desire) and it would work just as well.

If you compare the joystick and gamepad ones you'll see that the tags used are slightly different (<joystick profile="game.controller.default"> vs <gamepad> for example) which shows what is actually referred to.

As to which one is used, it depends on the hardware and how it identifies itself to the device running Kodi - either as a joystick or a gamepad in this example.


RE: Difference between joystick.xml and gamepad.xml - garbear - 2018-12-26

(2018-12-17, 13:48)Wintermute0110 Wrote: I have been looking at the wiki but I cannot find what's the difference between joystick.xml and gamepad.xml. Both files seem to have the same purpose. Can someone explain what's the difference and purpose of each file?

For reference, link to default joystick.xml in Leia, link to default gamepad.xml in Leia.
 
gamepad.xml is only used for EventServer. If you're not using EventServer, then joystick.xml is the file you want. Note that the filename isn't important, only the XML tags you use.

EDIT: Opened https://github.com/xbmc/xbmc/pull/15138