Lime-3DS-Emulator icon indicating copy to clipboard operation
Lime-3DS-Emulator copied to clipboard

Switch Pro Controller D-Pad not binding to emulator D-Pad

Open Chris-Hollow opened this issue 1 year ago • 4 comments
trafficstars

Is there an existing issue for this?

  • [x] I have searched the existing issues

Affected Build(s)

2109

Description of Issue

On the Android Version, the D-Pad of the Switch Pro Controller can't be bind to any of the axis (C-Stick, D-Pad and Circle Pad), but they can be bind to any other button

Expected Behavior

The D-Pad shoud be able to be bind to the Axis

Reproduction Steps

Connect a Switch Pro Controller through Bluetooth or a cable to an Android Device. Go to Options > Settings > Gamepad and select any of the axis to map a controller. Press the buttons on the D-Pad when the bind windows asks to mobe joystick up/down or left/right

Log File

no log as it's a setting error

System Configuration

CPU: Rockchip RK3588S GPU/Driver: Any RAM: 4GB OS: Android 12

Chris-Hollow avatar Apr 15 '24 18:04 Chris-Hollow

This issue seems to be caused by Citra only supporting controllers which use an axis for their dpad input as opposed to those which use buttons inputs for the dpad, as the Switch Pro controller does. This should be relatively simple to fix

OpenSauce04 avatar Apr 28 '24 13:04 OpenSauce04

It turns out that this is more complex than I initially thought. The way that controller binding system is currently implemented seems to be very "one or the other" when it comes to axis and buttons. I attempted to switch to using buttons for the dpad, which made the Switch Pro controller work, however this broke compatibility with axis dpad controllers like the DS4 despite the DS4 dpad buttons seemingly being recognized in the settings

I am unsure how to approach this. One way could be having both an axis-based and button-based dpad section next to each other and allow the user to pick which one to use depending on their controller. That may be a little messy but I can't think of any other solution that doesn't involve a rather invasive restructure of the controller binding code

OpenSauce04 avatar Apr 28 '24 14:04 OpenSauce04

My current plan is to implement the suggestion I mentioned in the previous message. Unless a better suggestion is brought up, this will be included as described as part of the 2113 update

OpenSauce04 avatar May 11 '24 20:05 OpenSauce04

This feature has been pushed back to 2114 due to other features taking priority in the roadmap

OpenSauce04 avatar May 19 '24 20:05 OpenSauce04

Addressed in cae3285

OpenSauce04 avatar May 27 '24 20:05 OpenSauce04