I have been trying to add gamepad support to an electron app I am writing and have found that a lot of libs for gamepads, and even the gamepad API, don’t work correctly.
I am specifically trying to use this lib https://samiare.github.io/Controller.js/ for controller support, only because it maps analog sticks to dpad events (which is essential for what I am doing). However the lib throws errors only while in Electron. I copied the opened the same code in my browser and it worked as expected, no errors.
Anyone got any ideas on what might be causing this or a way to fix it (either a fix in Electron or an alternative lib)? Like I said I’ve tried other libs and they are almost all broken in some way as well, which leads me to believe it’s the gamepad API that’s the underlying problem here.