Joystick input not working via Snapcraft

I noticed this when trying some other snaps that games did not register my Joypad via snap, chalking it down to the publisher, I thought nothing of it. Until recently publishing my own game via snap a few hours ago after adding Joystick support via GLFW. When run via snap sandbox the Joystick input fails to register, I also tested this on a second snap of mine, another GLFW game with Joystick input - again not working via snap sandbox.

It would seem that Joystick Input is completely broken via the snap sandbox, and it doesn’t seem to be limited to apps using GLFW.

did you add the joystick plug to the app in your snapcraft.yaml and did you connect it after installing your snap with the

snap connect ... 

command ?

snapcraft expand-extensions revealed that I did need to include the joystick plug as it was not included by default by gnome-3-38 but also I did not know I also needed to manually execute snap connect snowling:joystick having done this it now works perfectly fine. Thank you.

I think the need to manually connect Joystick controllers is doubleplusungood, I think most average users will not get that far and would just assume that their controller does not work which could certainly be seen as a drawback from snapcrafts user friendly prerogative.

you can just file a request for auto-connection of the joystick plug for your snap. just open a new thread in the store-requests category (take a look at other posts in that category to see how they are done), then the manual connection will not be needed anymore …

Thank you, this I also did not know. :bowing_man: