HTML5-JavaScript-Gamepad-Controller-Library icon indicating copy to clipboard operation
HTML5-JavaScript-Gamepad-Controller-Library copied to clipboard

Consider firing synthetic events

Open cvan opened this issue 11 years ago • 0 comments

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.

cvan avatar Jul 16 '14 02:07 cvan