libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
9.76k stars 1.77k forks source link

You can't clear RetroPad joystick inputs on PSVita #16644

Open dfilskov opened 4 weeks ago

dfilskov commented 4 weeks ago

When you place the cursor on an analogue direction on the RetroPad's Vita controller in the Input menu and press the Square button that analogue direction should be cleared - but it isn't.

Instead of clearing the selected analogue direction it's reset to the default mapping.

E.g. if your right PSVita analogue joystick has drift it moves the cursor around in the menu with no way to stop it - RA becomes impossible to use :(

(you can't even edit the Vita controller cfg file manually, I think - it seems to be built-in)

Please make it possible to clear the joystick directions input.

zoltanvb commented 3 weeks ago

Indeed it does not work (on other platforms either). It does something, but I am not sure if this is intentional - if there is also keyboard map for the entry, pushing "scan"/"west" face button clears that, but not the controller mapping. Code looks as if it wants to clear all: https://github.com/libretro/RetroArch/blob/e9682cbbd6c018daf4e4bc947f1ca0d2705d1b4b/menu/cbs/menu_cbs_scan.c#L244

@sonninnos , do you have any insight if this is something of a feature?

sonninnos commented 3 weeks ago

Works fine here on Windows with every bind item. Start resets to default and Y clears to "---".

But sure, those binds that come from autoconf profiles are not cleared. And for overwriting the profile with null binds being able to do so would make it a lot easier.

dfilskov commented 3 weeks ago

Glad you guys are looking into this.

If I remember correctly it works (clears the binding) on both Steam Deck and Android

... and on the not officially supported Trim UI and RG351M.

Otherwise it might be other bindings (like buttons) I'm thinking of that work/can be cleared and not the joystick directions.

zoltanvb commented 3 weeks ago

Clearing the autoconf bind is a rather small code change, but even in my limited tests, I have found some more implications.

First, if autoconf binds are cleared by button Y, and no other action is done, they will come back on next restart. Then, if some autoconf binds are cleared, and then autoconf profile is saved, it will be empty (as there were no manual binds) and will essentially lock out the user on next boot. If the profile saving is updated to merge with previous autoconfig (or full bind was done before saving), that kind of works, but it does not preserve the button labels.

Let's leave a bit of time for thinking it over (comments welcome), if no better idea, I can still submit it in this form.

dfilskov commented 3 weeks ago

Good points!

To avoid the problem (of the drifting right thumbstick moving the cursor around on my PSVita) I changed the Device Index for the RetroPad Binds / Port 1 Controls - that instantly locked me out too.

No warning, no auto undo with a count-down to accept the change (like in Windows when you change resolution) and no way to undo it (other than closing RA).

Perhaps that could be solved too by implementing a sort of test/check before the change is saved/activated. Otherwise I could post this as a seperate suggestion.

Oh and I don't think I can find autoconf on the PSVita so that I can edit it.

sonninnos commented 3 weeks ago

I have noticed that index change potential too ages ago, and have had it in my TODO to somehow prevent changing/removing the only used controller.

dfilskov commented 3 weeks ago

Perhaps simply prevent the user from changing/removing the last set of necessary active bindings (index etc. included)

This would make it impossible to remove/change the last binding for each directional input and the last confirm button (and cancel/back?).

The user would be forced to have a set of "backup" bindings before changing the active ones.

But perhaps the best way would be a pop-up where the user was asked to complete a test of the new bindings (testing the necessary bindings) before they were applied.

zoltanvb commented 2 weeks ago

Okay, it was worth to wait a bit, I checked the input driver and realized that changing the autoconf may not solve this issue, as the vita input is pretty much hardcoded. It would be better to see the change in action, but it seems I can't use vita3k to run RA.

For the menu problem, disabling right analog stick has already been requested in #16274 , maybe it is better to add that.

dfilskov commented 5 days ago

Great suggestion - thanks!

Do you need to use a PSVita to be able to fix this issue of clearing/changing the joystick navigation?