Thanks for your great work! This helped me a lot on dealing with chrome before v89.
While applying this pack, I found a bug with search here
https://github.com/thayallans/ds5chrome/blob/4fbc7ddc3a6fa4aad699f9f16046f8218be442cf/ds5.js#L23C13-L23C96
if (
initialGamepads[index] !== null &&
(initialGamepads[index].id.search(regex)) // this will return -1 for non-ds5 controller
) {...}
(initialGamepads[index].id.search(regex)) will always return true. All controller will be recognized as ds5.
Use includes instead will simply solve this.
Thanks for your great work! This helped me a lot on dealing with chrome before v89.
While applying this pack, I found a bug with
searchherehttps://github.com/thayallans/ds5chrome/blob/4fbc7ddc3a6fa4aad699f9f16046f8218be442cf/ds5.js#L23C13-L23C96
(initialGamepads[index].id.search(regex))will always return true. All controller will be recognized as ds5.Use includes instead will simply solve this.