HTML5-JavaScript-Gamepad-Controller-Library
HTML5-JavaScript-Gamepad-Controller-Library copied to clipboard
Consider firing synthetic events
Maybe if a special option is passed, the Gamepad could synthesise gamepadconnected and gamepaddisconnected events. Using a requestAnimationFrame loop, we would just check the state of navigator.getGamepads().
Not sure if this is a good idea, but it would fix #21 and could be useful for devs since I'm sure many devs have to do this themselves anyway.