libretro / libretro/RetroArch

Controller disconnecting on Android device while button is pressed causes the game to continue having that input pressed

Open
#16,709 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Description

NOTE: I am not certain that this is a RetroArch issue. If the issue is relevant to the core instead of the overall app, please feel free to close this issue.

While a button was held down on a controller, the controller disconnected. The actual disconnection is not a problem as I believe this was the controller's fault and it reconnected after a few seconds. However, the button continued to be held down in-game and the game refused to acknowledge anything other than that existing button press. After minimising and restoring the app, entering and existing the menu and generally messing around with the screen and controller, the game began to accept other inputs but still
continued to behave as though the previously-held button was still held down. Again, after some time (perhaps a minute in-game), the game stopped behaving as though the button was held down and I was able to continue normal gameplay again.
I was playing Shantae (Game Boy Color) at the time, using the VBA-M core set to emulate Game Boy Advance.

Expected behavior

While a controller button was being held down, the game would detect no input after the disconnection of the controller.

Actual behavior

When the controller disconnected while a controller button was being held down, the game continued to behave as though the button was held down for a while.

Steps to reproduce the bug
  1. Connect controller
  2. Hold button down on controller
  3. Get controller to disconnect while holding down a button?
Bisect Results

I have only experienced this once on 1.19.1

Version/Commit

You can find this information under Information/System Information

  • RetroArch: 1.19.1 Nightly (2024-06-13)
Environment information
  • OS: Android 14 (Samsung Galaxy S23)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the Android controller-disconnect sequence described in the issue, then trace the input handling path for disconnect events; done means the active button state is cleared and the game accepts subsequent input immediately.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, c
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.