Difference between joystick.xml and gamepad.xml
#1
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.
Reply
#2
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.
Server: Ubuntu Server 22TB HDD running SAMBA
Kodi: 4 Raspberry Pi 3 running Libreelec -  on the main PC - running Linux Mint
My Setup thread |
Reply
#3
@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...
Reply
#4
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!
Server: Ubuntu Server 22TB HDD running SAMBA
Kodi: 4 Raspberry Pi 3 running Libreelec -  on the main PC - running Linux Mint
My Setup thread |
Reply
#5
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.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#6
(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
Reply

Logout Mark Read Team Forum Stats Members Help
Difference between joystick.xml and gamepad.xml0