Kodi Community Forum

Full Version: Joystick not recognized in emulators
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm hoping I'm missing something simple here, I've got a PS4 DualShock controller, it works in Kodi to browse and when I launch the emulators the left/right directionals trigger like a rewind and forward and none of the buttons are picked up in the actual game itself. I've gotten the appropriate peripheral.joystick file from: https://github.com/xbmc/peripheral.joyst...13b_8a.xml, and joystick.xml, slightly modified from https://raw.githubusercontent.com/xbmc/x...ystick.xml. Tried adding some noops for the SNES as a test bed:
<joystick profile="game.controller.snes">
<a>noop</a>
<b>noop</b>
<down>noop</down>
<left>noop</left>
<leftbumper>noop</leftbumper>
<right>noop</rightbumber>
<select>noop</select>
<start>noop</start>
<up>noop</up>
<x>noop</x>
<y>noop</y>
</joystick>

Yet still no luck.

Help?
This means it's at least recognizing the buttons.. and they are being translated into.. a feature(?).. so why wouldn't it make it to the emulator/game then?

18:16:23.944 T:1730147232 DEBUG: BUTTON [ 9 ] on "Wireless Controller" pressed
18:16:23.944 T:1730147232 DEBUG: FEATURE [ start ] on game.controller.default pressed
18:16:23.944 T:1730147232 DEBUG: FEATURE [ start ] on game.controller.snes pressed

Full pastebin.. http://sprunge.us/FEFa
Removed the joystick.xml from userdata/keymaps, it had some typos and apparently noop just removed my ability to use the controller when the on screen display is triggered, had no effect on the emulators.

Latest debug logs: http://sprunge.us/SffM

I'm using a PS4 DualShock controller with a RPi3
It's probably not working in the emulator because it's controlling the wrong player. Can you test this? I'm working on a player manager now (see the thread) so we can troubleshoot and modify this in the GUI.
Where to begin with testing? Is this something that can be configured in xmls/etc, or would it require a separate build?
From your debug log:

Code:
19:36:16.232 T:1737081760    INFO: AddOnLog: Joystick Support: Initialized joystick 0: "Wireless Controller", axes: 8, hats: 0, buttons: 13
19:36:16.232 T:1737081760    INFO: AddOnLog: Joystick Support: Initialized joystick 1: "Wireless Controller Motion Sensors", axes: 6, hats: 0, buttons: 0

The problem is that recently the bluetooth driver was updated, and now PS4 contollers show up twice. A couple of us have been tracking this problem in the LE test builds thread: https://forum.kodi.tv/showthread.php?tid...pid2622027

Currently, the code to select which controllers go to which players doesn't exist. I should be done with the player manager in a week or so. That will help us troubleshoot the problem if no one makes any progress in the meantime.
Still working on this, found out I could just remove the extra input devices (rm /dev/input/garbagedevices) and restart kodi: http://sprunge.us/NgXh

But it still does not work.. and whenever I do right or left on the dpad it triggers the forward/rewind seeks, making me think it might need something setup in the josytick.xml file?

Whenever I do have a joystick.xml file, the number of lines where it shows the feature was pressed increases by 2, like it is searching the configs to see how to properly handle it and as opposed to doing whatever it is that it needs to be doing it just does some arbitrary other action, such as a forward or backward seek.

Without a joystick.xml, it triggers the seeking:
10:05:28.336 T:1737487264 DEBUG: FEATURE [ right ] on game.controller.default pressed
10:05:28.336 T:1737487264 DEBUG: FEATURE [ right ] on game.controller.snes pressed
10:05:28.344 T:1737487264 DEBUG: FEATURE [ right ] on game.controller.default pressed
10:05:28.453 T:1942508096 DEBUG: Previous line repeats 1 times.
10:05:28.453 T:1942508096 DEBUG: ------ Window Init (DialogSeekBar.xml) ------
10:05:28.454 T:1942508096 DEBUG: ------ Window Init (Custom_1109_TopBarOverlay.xml) ------
10:05:28.520 T:1737487264 DEBUG: FEATURE [ right ] on game.controller.default released
10:05:28.520 T:1737487264 DEBUG: FEATURE [ right ] on game.controller.snes released
10:05:28.520 T:1737487264 DEBUG: FEATURE [ right ] on game.controller.default released
10:05:29.505 T:1942508096 DEBUG: Previous line repeats 1 times.
10:05:29.505 T:1942508096 DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------
10:05:29.505 T:1942508096 DEBUG: ------ Window Deinit (Custom_1109_TopBarOverlay.xml) ------
I've received similar reports. The problem is the logic in determining whether the fullscreen game window is on top - sometimes it gets confused. I've added this to my Leia controller bugs milestone, not sure when I'll get to it but seeing as how it's the easiest bug on the list, it shouldn't be too long.

EDIT: I have a more complete timeframe. I'm currently working on the new Player Manager. It's such a huge and complex problem that I don't have the bandwidth for this problem now. I'll probably open the pull request in a week or two. At that point, I have a week of downtime while it's in review. I'll address this bug (any many others) during that period,
This should be fixed by PR:12889 which has just been merged into master. I'll include it in the test builds I'm uploading soon.
(2017-07-29, 19:06)thejims Wrote: [ -> ]But it still does not work.. and whenever I do right or left on the dpad it triggers the forward/rewind seeks, making me think it might need something setup in the josytick.xml file?

Is this problem fixed in the latest v18 nightlies?
Hello, I have exactly the same problem on my SHIELD TV. No matter if Xbox One controller or Shield controller, I start an emulator, the controller continues to execute only Kodi commands and does not react in the emulator. An idea how I can solve this?
(2018-07-23, 05:26)nevrion Wrote: [ -> ]Hello, I have exactly the same problem on my SHIELD TV. No matter if Xbox One controller or Shield controller, I start an emulator, the controller continues to execute only Kodi commands and does not react in the emulator. An idea how I can solve this?

can you post a debug log? that usually shows what's broken in the input chain
Hope it helps, thank you : http://paste.kodi.tv/huwibojeru
The required controller profiles aren't installed. Can you install the NES controller add-on and try again?
Sorry, I had tried another Kodi version and then probably forgot it. However, the same problem persists

https://paste.kodi.tv/wamidifira
Pages: 1 2