schellingb / dosbox-pure

DOSBox Pure is a new fork of DOSBox built for RetroArch/Libretro aiming for simplicity and ease of use.
GNU General Public License v2.0
752 stars 62 forks source link

Please optimize mouse emulation with a touchscreen. #231

Open UrusMax opened 2 years ago

UrusMax commented 2 years ago

For a more convenient use of the mouse emulator with a touchscreen, I suggest this configuration option: 1) Double tap with one finger = 1 click with the right mouse button; 2) Holding one finger with movement = only moving the mouse cursor, without triggering mouse button clicks; 3) Tap with the second finger while holding the first finger on the touchscreen = left mouse button click; 4) Double tap with the second finger while holding the first finger on the touchscreen = double click of the left mouse button (plus add a separate delay adjustment in milliseconds); 5) Holding the second finger while holding the first finger on the touchscreen = holding the left mouse button.

If possible, please create one. Perhaps this configuration will solve another problem - while clicking the overlay icon, the left mouse button is pressed at the same time. This is very disturbing in some situations.

schellingb commented 2 years ago

I don't think this is possible for a libretro core. Do you know of any other cores that do something like this? Or have mouse emulation that is easier to use with a touchscreen? I'm certainly open to improvements in this area, I'm just not sure what can be done.

UrusMax commented 2 years ago

Hello. I am not aware of libretro cores with similar mouse emulation. I use the cores of various consoles, but there is no need to control the mouse as in DOS games. I met a similar mouse emulation on the touchscreen in the Magic DOSBox application for Android, there are more flexible settings than I suggest. And the main convenience lies in the fact that when you hover your finger over the widget (an analogue of the overlay button, in a sense), only the widget (overlay) button is triggered without duplicating mouse clicks. In Magic DOSBox, mouse emulation is implemented as conveniently as possible. This is the only thing I can suggest. I understand your uncertainty about the implementation of such optimization. Moreover, I am not an expert and experienced difficulties in the formulation of the question itself. It may be possible to somehow reassign touches to the screen at the kernel level by adjusting the desired buttons of the emulated mouse. In any case, I am very grateful for the attention to this issue! I hope you, as a developer, have a way, you should at least try.

ZeroAlvein commented 2 years ago

I also use Magic Dosbox and i know what benefits it provides when it comes to customizing controls over RA But since we have to figure something out within limits of RA i would say let's go for overlay

Basically 1st thing that would be necessary is to have option to switch mouse cursor to only be pointer not clicker with touch So no matter where you touch the screen you only are moving the mouse never clicking But like i said a OPTION so ppl who want to click with touch should still have option to do so

Then step 2 would be use custom made overlay which have some buttons which could be set to mouse clicks which kinda should be possible

Buttons could be set to any size and placed anywhere for example even in corners or edges of the screen they could even be invisible

And since you can launch a game save per game overrides of global settings it would NOT affect your overlay for other cores systems

So only question left would be is it possible to make so touch controls do not click but only move mouse? If so i could even make that kind of overlay

Considering number of buttons added and their visibility could be adjusted easily it would allow for even quick commands in command and conquer like games to be easily executed

But it's still solution that involves custom made overlay it's best option B i can up with IF equivalent of that same as virtual keyboard could not be implemented

UrusMax commented 2 years ago

Thank you very much for your attention. I will try.

toughguystudios commented 1 year ago

Hey, was there ever any update to this? Still wondering to know if it's possible to move the mouse cursor using my finger over the touchscreen in Retroarch...

UrusMax commented 1 year ago

Эй, было ли когда-нибудь какое-нибудь обновление к этому? Все еще интересно, можно ли перемещать курсор мыши пальцем по сенсорному экрану в Retroarch...

По всей видимости нет. Или я не смог разобраться.

schellingb commented 1 year ago

It works on Android, but I think on iOS it's different. I don't have an iOS device but I was told there is a little arrow icon at the top of the menu screen which when touched shows a mouse and keyboard icon: image It might be only in iOS 13 and newer? Sorry I don't have an iOS device so I can't try any of this.

The plan is to add more options for mouse control in the next bigger update, as discussed in #400. Maybe once that is complete we can optimize things for iOS with everyone's help.