libretro / libretro/RetroArch

[Android] gamepad stops working after loading/closing content

Open
#10,047 41 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

I’m using a generic USB gamepad with OTG connection.
The USB gamepad is recognized upon opening RetroArch, I’ve been able to map all the keys properly, the issue is after loading a game or closing the game (content); the gamepad does nothing as if it had been disconnected, not even when returning to the RetroArch menu (the gamepad is still responsive to the OS). The only thing that works is unplugging/plugging back the usb gamepad and pressing any button, then I get the bottom-left notification message about it being detected again and it starts working within the game and RetroArch menus.

I’ve tried saving the autoconfig file too, but it makes no difference at all… works until a game is loaded and I’m back to unplugging/plugging back.

Expected behavior

Gamepad should not stop working when loading/closing content (ROMs).

Actual behavior

Gamepad stops working after loading/unloading content until being physically unplugged/plugged back.

Steps to reproduce the bug
  1. Open RetroArch, press a button on gamepad, detected!
  2. Navigate just with the gamepad, load content (Genesis Plus GX core);
  3. Content is loaded, gamepad stops working immediately;
  4. Unplug/replug gamepad, it gets recognized in-game and works fine;
  5. After playing a few seconds I press the menu hotkey on the gamepad, select 'Close content';
  6. The game is unloaded, goes back to RetroArch menu and gamepad no longer works again;
  7. Again, I have to unplug/plug back the gamepad for it to work once more.
Bisect Results

Tested multiple versions, as far back as v1.2.2 (Jul 19 2015).

  • v1.2.2 does not have this issue, but the next release does - v1.3.0 (Feb 25 2016).

  • v1.3.0 seems to be where this issue started and also when introduced the new menu design. It could be just a coincidence and the gamepad issue on content load/unload not being related to the material design menu, nevertheless since then all versions have the same issue with a few controllers and the same workaround applies (holding 'confirm' button and pressing D-Pad when loading content).

Version/Commit
  • RetroArch: 1.8.4/f425d8d
Environment information
  • OS: Android v8.1

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

Start by reproducing the controller failure on Android using the listed steps, including loading Genesis Plus GX content and then closing it. Compare the linked session log and gamepad configuration with the behavior before and after content load/unload. Done means the gamepad remains responsive in both the content and RetroArch menus without unplugging it.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, c
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.