Skip to content

GamePads.update() doesn't remove entries from current upon gamepad disconnect #1014

Description

@leweaver

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++) {

Metadata

Metadata

Assignees

Labels

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions