libretro / libretro-uae

PUAE libretro
GNU General Public License v2.0
111 stars 60 forks source link

[Feature request] Emulate mouse by using device's touchpad #588

Closed babosvabo closed 1 year ago

babosvabo commented 1 year ago

I don't know if it is already supported, but if not it would be great that a amiga mouse can be controlled by emulating device's touchpad.

I have tried to set the touchpad up on android phone (retroarch 1.9.12) and WiiU (retroarch 1.14.0) and couldn't do it. On android i can move it via overlay analogue stick and on WiiU only via hardware anslogue stick (touchpad doesnt work in retroarch on WiiU at all?)

Just to add info: generally I don't know where is the pinpoint of the problem with using touchpad to control mouse movement in amiga: is the problem in the emulating device support/retroarch or the PUAE core?

sonninnos commented 1 year ago

It already does that by default on my phone.

babosvabo commented 1 year ago

It already does that by default on my phone.

Which version of retroarch? By default you mean that you haven't changed any default options that retroarch had when you installed it?

Also do you have that functionality via overlay or with overlay turned off?

Could you please confirm that it really works as you say, you should be able to turn that option off. Please try to turn it off and describe here how and where have you went to manage touchscreen options while emulating with PUAE

sonninnos commented 1 year ago

Latest, and every version I've tried so far.

It can't be turned off from the frontend, since mobile touch handles mouse pointer and desktop mouse handles touch pointer. As in touch can be emulated/simulated in desktops with mice, and mobile touch automatically translates to mouse pointer, so it just works.

But it can be disabled via PUAE by the core option "Physical Mouse" which disables all mouse pointer input, which also includes touch, since it is just mouse input.

Overlay does not matter as long as overlay does not overlap with the whole screen. Free unused space goes directly to mouse.

babosvabo commented 1 year ago

Have you tried to play games which require mouse and if yes, which game so I can try to compare our experience because for me touch does work in Retroarch menu but it doesn't in games. For examle, I've tried in Dune 1 and when in game, touch works only in a way that I can touch overlay controls, but it doesnt work as mouse, so if I want to move ingame pointer, i have to touch overlay analogue controller which then moves the ingame pointer. So, can you move ingame pointer just by touching it (so basically you dont need overlay) or in which way you move ingame pointer by touch?

sonninnos commented 1 year ago

Yes, default settings it works as fine as it can, as in as a touchpad which pushes the cursor around, and single tap is LMB and doublefinger tap is RMB, as can be seen in the statusbar joyport info. It isn't going to be moving the mouse cursor immediately to the pointed location if that is what you mean.

Whatever it is I'm pretty sure it is not a problem with the core, since it reads the inputs that it can and should.

babosvabo commented 1 year ago

Yes, I'm taking about pushing the cursor around by touchpad...

I have freshly reinstalled Retroarch on my android phone and touchpad control doesn't work, only overlay analogue joystick that mimics mouse. Here's the video: https://youtu.be/YHFUyd5NJvo

What I'm doing wrong? How to controll game pointer via touch even without using overlay

PS I have Samsung S10 with Android 12

rsn8887 commented 1 year ago

I am pretty sure I tested touch input when I was testing this core on Android.

It might help to update to a current Retroarch version. It looks like you are using the ancient version 1.9. The current version is 1.14. The galaxy store seems to have it.

babosvabo commented 1 year ago

It works! It was the old version of retroarch... can't figure why google plays store doesn't update its retroarch to final version...

Anyway, thank you very much for your help!

Also, is there any chance that you understand how touchpad works on WiiU? It would be great that the same control of mouse with touchpad could be implemented on WiiU but it seams that no one knows how to implement it. Here's the thread: https://github.com/libretro/RetroArch/pull/11191