Skip to content

Fix for held button issue in SNES input addon - #1732

Open
EricICX wants to merge 1 commit into
OpenStickCommunity:mainfrom
EricICX:SNES-Addon-Fix
Open

EricICX wants to merge 1 commit into
OpenStickCommunity:mainfrom
EricICX:SNES-Addon-Fix

Conversation

@EricICX

@EricICX EricICX commented Sep 26, 2026

Copy link
Copy Markdown

While testing the SNES input addon with a NES controller, I found that whenever all buttons were released, the last pressed button would remain pressed.

When the controller is polled, the polling function assigns a type to snes->type. From my testing, if no buttons are pressed, the type is set to SNES_PAD_NONE, which results in the buttons not updating, and the last pressed button being held down.

This code fixes that by providing a fallback case that resets all buttons when the type is not set to SNES_PAD_BASIC, SNES_PAD_NES, or SNES_PAD_MOUSE.

@NickGuyver

Copy link
Copy Markdown
Contributor

Can you just add the rest of the buttons as seen here? - https://github.com/OpenStickCommunity/GP2040-CE/pull/1705/changes

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants