batocera-linux / batocera-emulationstation

MIT License
318 stars 247 forks source link

Bug in v37 Steam Deck: R4 mouse-click breaks controller mapping #1474

Closed dfilskov closed 11 months ago

dfilskov commented 1 year ago

Please watch video.

On Steam Deck when you try to map Right stick press in CONTROLLER MAPPING to R4 the mapping jumps back and replaces the analogue stick mapping.

dfilskov commented 1 year ago

https://github.com/batocera-linux/batocera-emulationstation/assets/15096058/e4f67722-18a5-4e52-bf1a-eaa453f14d65

joinski1 commented 1 year ago

@dfilskov which button on Steam Deck is R4?

dfilskov commented 1 year ago

Upmost rear button for the right middle finger:

https://www.androidheadlines.com/wp-content/uploads/2022/04/Steam-Deck-Rear-Buttons-1420x799.jpg

Must be no. 21 internally in Batocera.

joinski1 commented 1 year ago

Okay, my guess is, that it is because since v37 the R4 and R5 buttons on Steam Deck are preconfigured in ES now and acting as right and left mouse-click in the F1 File Manager (which can be accessed since v37 with a press on the button with the three dots below the right trackpad). So you should better use Left and Right stick press as Left and Right stick press ;) (the analog sticks of the steam deck can be pressed and therefore used as buttons, if you did not know this yet). Otherwise you would have to map those buttons within RetroArch options or via editing the config-files of the standalone emulators yourself. See wiki on how to edit button mapping per system/emulator.

dfilskov commented 1 year ago

prrssed: I know but it's horrible :) using a joystick for emulating touch input on e.g. an NDS touchscreen isn't easy - but press'n'holding down on the stick makes it impossible to use.

Pressing a joystick obstructs precise movment. That's why L4 and R4 is perfect as stick press. And assigning them to stick presses is the only way to make L4 and R4 (and L5 and R5 I guess) available for mapping in RetroArch IFAIK.

dfilskov commented 1 year ago

The issue was also present in v36, I think.

joinski1 commented 1 year ago

@dfilskov No in v36 the issue was not present, you could assign R4 and R5 to every button you want (i just tested it on my Steam Deck with v36).

Regarding NDS touch control: libretro/desmume R2 is touchpanel press libretro/melonds R2 is switching position of displays, here you have to press R3 (analog joystick press) and yes, i agree, this feels a bit awkward melonds standalone touchscreen of steam deck does work (best solution, because it feels just like a real NDS)

so best is to use melonds standalone or libretro/desmume, or if you absolutely wish to use libretro/melonds, there should be the possibility to change the assignment of R2 in the RetroArch Settings (from display position switching to touch panel press)

dfilskov commented 1 year ago

Got it! - thanks - yeah, I can use some workarounds.

Hope at some point it can be made to work correctly again, though - like in v36.

joinski1 commented 1 year ago

Why do you prefer using R4 or R5 instead of R2 or a real touchscreen press? I don't see the current behaviour as incorrect as you seem to do.

dfilskov commented 1 year ago

Sure, I can use other buttons too, that's OK (sometimes L2 and R2 are nice for other actions, though).

But I see it as a bug that you can't assign all the Steam Deck's buttons in ES - or at least I'd define it as a bug when buttons that you cannot assign in ES do something "unfriendly" and unpredictable with no warning (as in the video) if you try :)

Perhaps it's possible for the user to disable mouse buttons in ES menus.

dfilskov commented 1 year ago

Ah yes. The (•••) button works like the F1 key did in ES when you're not viewing game lists. That's good.

And R4 and R5 does work too as mouse buttons in the file manager, like you wrote ... and left touchpad as touchscreen/pad. Cool.

Perhaps those mappings could be made to only work in the file manager and not in the ES menus/games. Or even better - be assignable.

dfilskov commented 1 year ago

It seems the mouse pointer is present - but invisible - in ES now - and always centeret and happens to hover over the CONTROLLER MAPPING's Left analogue stick left-axis mapping when you're mapping L3 and R3 - and clicking the left mouse button on a key mapping causes ES to reset it and move to that mapping causing the unfortunate reaction.

If I connect a mouse I might be able to move the invisible mouse pointer and map the R4 after all.

dfilskov commented 1 year ago

Workaround found:

In Main Menu / CONTROLLER & BLUETOOTH SETTINGS / STEAMDECK MOUSE/GUN SETTINGS set MODE to GUN while mapping R4 in CONTROLLER MAPPING. That will prevent R4 from working as a mouse-click inside ES menus which obstructs remapping of R4.

dfilskov commented 1 year ago

Why do you prefer using R4 or R5 instead of R2 or a real touchscreen press?

Is there a way to make touchscreen taps work in RetroArch?

fabricecaruso commented 11 months ago

I'm closing this one as this issue is not directly related to EmulationStation but what the systems ( batocera ) sends to SDL when clicking. We won't be able to change anything on EmulationStation's side.