Project

General

Profile

Actions

Emulator Issues #12152

closed

[Android] Axis inputs erroneously accept button inputs with the same ID number

Added by MehStrongBadMeh almost 4 years ago. Updated about 1 year ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
Android
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:
5.0-18920

Description

Game Name?

All Games

Game ID? (right click the game in the game list, Properties, Info tab)

All Games

MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)

N/A

What's the problem? Describe what went wrong.

Axis input mappings will accept buttons with same id number as the axis in question. This issue can be difficult to notice in many scenarios, as most gamepad buttons have keyevent IDs in the 96-110 range, while most axis ids are in the range of 0-20. But this issue can become an issue due to the value zero. Specifically, Axis 0 is the X-Axis a commonly used axis on the Left thumstick, while Button Keyevent ID 0 is UNKNOWN, the keyevent that is assigned to all buttons that don't have a mapping in Android's keylayout database. As a result of UNKNOWN essentially being a "null" or "error" button, most applications are coded to explicitly ignore it. Dolphin seems to be unique in not only accepting input from button 0 (UNKNOWN), but also letting the button act as input for Axis 0 (X-Axis). As a result, controllers that have unrecognized buttons will cause Control Stick Right to be triggered when pressed. My recommendation is to add code to ignore all inputs of button 0 and/or add code to ensure that button inputs cannot trigger an axis and vice-versa.

What steps will reproduce the problem?

  1. Press a button that sends a button ID 0 (UNKNOWN) event
  2. Axis 0 will triggered as if has a 100% state.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

Yes - 5.0-12115

Is the issue present in the latest stable version?

Yes - 5.0-11991

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)

[First broken version number here (if applicable)]

If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer

[Attach any fifologs if possible, write a description of fifologs and screenshots here to assist people unfamiliar with the game.]

What are your PC specifications? (CPU, GPU, Operating System, more)

Qualcomm Snapdragon 845
Qualcomm Adreno 630
Android 10
OnePlus 6

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

I can create an Android keylayout file to remap a controller to have a 0 key, if needed for replication/testing purposes.

Actions

Also available in: Atom PDF