Skip to content

refactor(input): remove dead and broken GamePads previous getter#8900

Merged
willeastcott merged 1 commit into
mainfrom
refactor/gamepads-remove-dead-previous-getter
Jun 14, 2026
Merged

refactor(input): remove dead and broken GamePads previous getter#8900
willeastcott merged 1 commit into
mainfrom
refactor/gamepads-remove-dead-previous-getter

Conversation

@willeastcott

Copy link
Copy Markdown
Contributor

Removes the unused, broken GamePads#previous getter and its _previous backing field.

It was @ignore with no callers (engine, tests, or examples) and would overflow the stack if ever called — it indexed buttons by gamepad index and assigned through this.previous, re-entering the getter. Per-button wasPressed/wasReleased state on GamePadButton has long since superseded it.

Spotted while reviewing #1014. No public API change (the getter was @ignore, so it never appeared in generated types); lint and npm run test:types pass.

🤖 Generated with Claude Code

The `previous` getter and its `_previous` backing field were unused
(`@ignore`, no callers in engine, tests, or examples) and broken: it
indexed buttons by gamepad index and recursed through `this.previous`,
which would overflow the stack if ever called. Per-button
`wasPressed`/`wasReleased` state on GamePadButton superseded it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@willeastcott willeastcott self-assigned this Jun 14, 2026
@willeastcott willeastcott added the area: input Input related issue label Jun 14, 2026
@willeastcott willeastcott merged commit 2b04fbd into main Jun 14, 2026
9 checks passed
@willeastcott willeastcott deleted the refactor/gamepads-remove-dead-previous-getter branch June 14, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: input Input related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant