Hide Unwanted Gamepads
There are cases where you want to not show some of the gamepads recognized, namely one of the two pairs coming when you're using a program like DS4Windows. One of them will show nothing, or show macro inputs instead of actual input you make.
If your browser capture comes with a custom CSS option, you can take advantage of it and make a rule to hide gamepads associated with a specific gamepad VID/HID. Read this wiki page to see how to do it.
Just don't forget to turn it on when you need to show it again.
Hide Disconnected Gamepads
Also now a disconnected gamepad won't freeze with the last input it received, and instead will be disappeared. This was a behaviour I kept at first, being worried that having to prepare and discard drawing tools for a gamepad on each connection changes, especially when it's rapidly connecting and disconnecting due to a bad contact, would hurt the performance or needlessly drain resources.
But the last frame of a gamepad remaining after the disconnection would lead to a misreading, and I decided that's a more important concern to consider.
- change placeholder texts for fade-out inputs 3b3e47e
When you empty the inputs, it won't put any other numbers. Now the placeholder texts when they're empty won't confuse users. - adjust triangle button label to fit with its active part 171b5f5
- add data attribute of gamepadId to each gamepad canvas b3cc18b
The hiding using a CSS rule is possible with this change. - remove gamepad slot on disconnection ca5c073