When a gamepad is disconnected, it should also be removed from the app.gamepads.current and app.gamepads.previous arrays.
It seems that the logic in the update method only iterates over the number of devices returned from Poll(), so doesn't get a chance to set excess entries to null:
|
for (i = 0; i < len; i++) { |
When a gamepad is disconnected, it should also be removed from the
app.gamepads.currentandapp.gamepads.previousarrays.It seems that the logic in the
updatemethod only iterates over the number of devices returned fromPoll(), so doesn't get a chance to set excess entries to null:engine/src/input/game-pads.js
Line 109 in d4b8e0a