libretro / libretro/RetroArch

Using a gamepad and binding a button to "input_enable_hotkey_btn" makes all RA keyboard functions to stop working and the client crashes if disconnected.

Open
#11,753 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

As the description says, using a gamepad, in this case a 8bitdo SF30 Pro, and binding a button to "input_enable_hotkey_btn", for example "select", makes all RA keyboard functions to stop working once ingame. If you have the gamepad inserted, you can exit to the menu and perform GUI actions with it, however, if you start retroarch with the gamepad disconnected, then go ingame, you will be stuck ingame, not being able to get to the menu using the keyboard (f1), saving, exiting the game, etc.

Furthermore, if you start retroarch using the gamepad, and suddenly disconnect it, retroarch crashes, the same happens when connecting the gamepad mid session.

All of this doesn't happen if input_enable_hotkey_btn is set to none, no crashes, and both keyboard and gamepad can be used ingame. I tested this on a clean config twice.

Log for reference:
retroarch.log

Expected behavior

Both keyboard keys and gamepad hotkeys (with the use of a hotkey button "input_enable_hotkey_btn", for example, to activate the AI service) should work while ingame.

The default keyboard hotkeys should still work while no gamepad is connected, and a "input_enable_hotkey_btn" binding was set before using one.

No crashes should happen when connecting or disconnecting the gamepad with a button bind to "input_enable_hotkey_btn" previously set.

Actual behavior

After setting a gamepad button to "input_enable_hotkey_btn", no keyboard functions work ingame, and the client crashes if the gamepad is disconnected or connected.

This only happens after a button is bind to "input_enable_hotkey_btn".

Steps to reproduce the bug
  1. Bing a gamepad button to "input_enable_hotkey_btn". In my case was a 8bitdo SF30 Pro and select (In case it only happens with this specific device)
  2. Load a game and try to use the keyboard to exit to the menu, or speed up the game, or exit the client, etc.
  3. Unplug the gamepad inside retroarch or plug it if it was disconnected. A crash should ocurr.
Bisect Results

Started happening when binding a gamepad button to "input_enable_hotkey_btn", using a 8bitdo SF30 Pro.
It stops happening once the function "input_enable_hotkey_btn" is set back to none. Sadly, this makes certain hotkeys using the gamepad impossible because they would overlap with basic game actions.

Version/Commit

RetroArch 1.9.0 (Git fab0eed15e)

Environment information

Windows 10, 64 bits. 12gb RAM, Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz.

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 issue on Windows 10 with a clean configuration, binding a gamepad button to input_enable_hotkey_btn and checking the resulting retroarch.log. Trace the keyboard-hotkey and gamepad connect/disconnect paths involved in the reproduction. Done means keyboard functions remain usable and connecting or disconnecting the gamepad does not crash RetroArch.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.