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

Not work in last Chrome (73.0.3683.86)

Open dalter opened this issue 6 years ago • 3 comments

Heya! The problem is that when you press any button, the gamepad is disconnected and reconnected This happens on Button up event, for some reason "gamepads.indexOf(gamepad)" return -1 and disconnect gamepads. When "this.knownGamepads[i]" has the gamepads Array it's very strange, I don't understand why this is happening Code example in the repository also does not work, the problem is in the library Please help solve this problem

dalter avatar Apr 06 '19 03:04 dalter

I checked and understood that in new chrome version navigator.getGamepads() return new object of gamepad and last object values not update, Because of this, functionality of this library not work true. and should be changed.

khanbabaeifanap avatar Apr 15 '19 09:04 khanbabaeifanap

Hi, thanks for response do you have any idea how to fix this ?

dalter avatar Apr 19 '19 00:04 dalter

@dalter check https://github.com/khanbabaeifanap/HTML5-JavaScript-Gamepad-Controller-Library/blob/master/gamepad.js

khanbabaeifanap avatar Apr 20 '19 10:04 khanbabaeifanap