RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

External controller not working correctly on RG351M

Open sergimes opened this issue 3 years ago • 7 comments

Description

When using Retroarch with Lakka 3.6 on the RG351 external controllers get recognaized, but the mappings to the buttons are not working, although analog input is being mapped correctly. When I go to input settings and try to map d-pad up, then I press d-pad up on the controller but nothing happens, as if it was not being registered. I'm using an F310 as external controller with a usb to type-c adapter, also tried with a Gamesir G3s and the problem is the same. I also tried using 351Elec that uses a frontend on top of retroarch and I have the same isssue, althought the controller is fully working on the ES frontend.

Expected behavior

When pluging external controller either the controller should work right away or it should be possible to map all the controlls.

Actual behavior

When pluggin external controller only analog input is being recognaized, buttons such as d-pad up or A don't seem to register.

Steps to reproduce the bug

  1. Plug external controller
  2. Go to Settings->Input->Controller 2
  3. Try to map D-pad up on the controller

Bisect Results

I don't rember this working any time, and I first encoutered this problem 5 months ago more or less.

Version/Commit

  • Build Date: Nov 13 2021
  • RetroArch: [fca72f67d1]

Environment information

  • OS: Lakka 3.6
  • Compiler: GCC (9.4.0) 32-bit

sergimes avatar Nov 24 '21 16:11 sergimes

I have this same problem on an RG351V running the stable 351Elec/AmberElec from November 2021 - any progress or resolution?

aldebaran27 avatar Apr 17 '22 23:04 aldebaran27

I know the issue - in "input/input_driver.h" there is a define for only one controller: #elif defined(HAVE_ODROIDGO2) #define DEFAULT_MAX_PADS 1

Changing this to a higher number fixes the problem. The reason it is broken is because in "input/drivers_joypad/udev_joypad.c" in the "udev_joypad_button" function there is this line: if (port >= DEFAULT_MAX_PADS) return 0;

This also impacts the D-pad hat, but not the analog joysticks and triggers (this is why those would work - I think it is an oversight that there is not a similar check for them).

aldebaran27 avatar Jul 01 '22 11:07 aldebaran27

Oh nice that you found the issue, thank you a lot, did you make a pull request to solve It?

sergimes avatar Jul 01 '22 12:07 sergimes

Yes, I just submitted it.

aldebaran27 avatar Jul 01 '22 12:07 aldebaran27

Has anyone confirmed if the fix worked in the nightly?

Keltron3030 avatar Jul 17 '22 02:07 Keltron3030

No, because I cannot find a nightly aarch64 build other than for Android - do you know where the aarch64 nightly build for Linux is located?

On Sat, Jul 16, 2022 at 8:28 PM Keltron3030 @.***> wrote:

Has anyone confirmed if the fix worked in the nightly?

— Reply to this email directly, view it on GitHub https://github.com/libretro/RetroArch/issues/13281#issuecomment-1186377975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOEVITMBE4IK75CYPJBI273VUNVT7ANCNFSM5IWQVUOQ . You are receiving this because you commented.Message ID: @.***>

aldebaran27 avatar Aug 01 '22 22:08 aldebaran27

Unfortunately no, I couldn't find it either.

Keltron3030 avatar Aug 01 '22 23:08 Keltron3030

Going to assume this issue is now fixed.

LibretroAdmin avatar Sep 03 '22 11:09 LibretroAdmin

This issue has indeed been fixed. Thanks again @aldebaran27 🙂

Keltron3030 avatar Oct 14 '22 01:10 Keltron3030