Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touch only accepts the actual cursor, not the indicator #171

Open
5 of 11 tasks
DarkSide1305 opened this issue Feb 14, 2024 · 12 comments
Open
5 of 11 tasks

Touch only accepts the actual cursor, not the indicator #171

DarkSide1305 opened this issue Feb 14, 2024 · 12 comments
Labels
bug Something isn't working input For issues related to input.

Comments

@DarkSide1305
Copy link

What version of melonDS DS are you using?

1.0.3

Does the problem happen in standalone melonDS?

I don't know.

What happened?

I have just found out that MelonDSDS ONLY reacts to Mouse Inputs that happen from the Actual Mouse (the one that is also visible in RetroArch)

20240214_213052.mp4
20240214_213102.mp4

In the first video you can see that on Hybrid Focus Bottom, it doesnt work at all. On Hybrid Focus Top it does work. And when you move the RetroArch mouse (the true, relative mouse), so that the MelonDS cursor isnt even on the screen anymore, then it works too. So it seems MelonDSDS only cares for the actual Cursor that RetroArch uses too, not for its own cursor

What should've happened instead?

MelonDSDS should listen to the actual shown cursor, not just to the PCs actual cursor

Which platforms do you see the problem on?

  • Windows
  • macOS
  • Linux
  • Android
  • iOS
  • tvOS
  • Other (specify below)

Which versions of the OS?

SteamOS, newest version

Which libretro frontend are you using?

RetroArch 1.17.0, Flatpak

Terms

  • I agree to follow the code of conduct.
  • I understand that melonDS DS is not developed or maintained by the authors of melonDS.
  • I understand that this form is for reporting bugs, not for requesting help.
  • I understand that the author develops this core in his spare time, and that he is under no obligation to respond to this bug report.
@DarkSide1305 DarkSide1305 added the bug Something isn't working label Feb 14, 2024
@JesseTG JesseTG added opengl For issues related to OpenGL. upstream This issue also affects the original melonDS. and removed opengl For issues related to OpenGL. upstream This issue also affects the original melonDS. labels Feb 15, 2024
@JesseTG
Copy link
Owner

JesseTG commented Feb 15, 2024

Let me ask you a couple of clarifying questions:

  • What is the joystick mode set to in the core options?
  • Could you post a savestate so I can try to reproduce this issue in similar circumstances?
  • How are you moving the mouse? With an actual mouse, or with the Steam Deck's trackpad?
  • Which input and joystick drivers are you using? Does the issue persist if you try different drivers?

@DarkSide1305
Copy link
Author

This rabbit hole goes even deeper then expected, let me record a video for you real quick

@DarkSide1305
Copy link
Author

DarkSide1305 commented Feb 15, 2024

Heres a video describing everything I found: https://youtu.be/zPiYDyETjK8

This should answer "What is the joystick mode set to in the core options?", and "Could you post a savestate so I can try to reproduce this issue in similar circumstances?" (because this is every touch input no matter what game it seems).

"How are you moving the mouse? With an actual mouse, or with the Steam Deck's trackpad?" via the Steam Deck Trackpad, but as you can see in my Video the actual mouse that is shown in RetroArch, so the "real relative mouse" plays a part in this too.

"Which input and joystick drivers are you using? Does the issue persist if you try different drivers?" also should be answered in the video, I have not tried changing the Driver as I wouldnt be too sure which driver I need to change, this doesnt feel like a Driver or Joystick mode setting, this seems to be an overall issue with the visual feedback of the cursor in MelonDSDS and changes on which Renderer you use

@DarkSide1305
Copy link
Author

DarkSide1305 commented Feb 15, 2024

What it looks like to me is that the Touchscreen only ever accepts the "real" Mouse Cursor Input, the one that is shown in RetroArch, but the floating square that MelonDSDS uses to show the Mouse is entirely inaccurate and even changes its behaviour under certain conditions

@DarkSide1305
Copy link
Author

On Discord I explained to someone else the issue that MelonDSDS has with the Cursor, so I think copy pasting this here might help clarify this issue even more:
"MelonDS I use "Mouse". In MelonDSDS I use Auto, which im pretty sure defaults to "Pointer". MelonDS, if you have it set up to Mouse, it will basically only care about its own Cursor that it adds, your "Real Mouse Pointer" doesnt matter, it adds its own cursor that gets stuck at the edges and doesnt go beyond them. MelonDSDS ONLY cares about your Real Mouse, the Cursor it adds is broken and doesnt correlate to your actual mouse and it can go offscreen (because your real mouse can go offscreen too) so you can actually loose your Pointer in MelonDSDS, and the way Jesse does screen orientation also messes up as it messes with the Pointer while in reality the Pointer is only "visually moved". To explain that, lets say default is Top/Bottom. Then the pointer will act like you ALWAYS have Top/Bottom, so you need to move the cursor up to have it move from Bottom to Top Screen. If you set it to Left / Right for example, doesnt matter, the Pointer only sees its Default, Top/Bottom, as the "true" screen orientation"
(If im wrong about how the screen orientation is done I apologize, I just think from my observation thats roughly how screen orientation is done and how the Cursor interacts with it)

@JesseTG JesseTG added the input For issues related to input. label Jun 18, 2024
@JesseTG
Copy link
Owner

JesseTG commented Jun 21, 2024

Now that I have a chance to work on this...

Good news is that I can reproduce the issue. I have some remarks:

So it seems MelonDSDS only cares for the actual Cursor that RetroArch uses too, not for its own cursor

That's right, with one caveat; when using the bottom-focused hybrid layout and showing both screens, the core accepts touches on either the hybrid view or the side view. This is for convenience, but it's not well-documented. Try it out!

However, it is true that the cursor doesn't render in the correct position in this case. The software and OpenGL renderers each draw the cursor differently, so I'll have to fix that. I've been positioning the cursor using the bottom screen's coordinates, but it looks like I should be using the composited screen's coordinates instead.

In MelonDSDS I use Auto, which im pretty sure defaults to "Pointer".

Not exactly. "Auto" mode forwards whichever input you most recently used to the emulated console. This way you can switch between the touch screen and the joystick at a moment's notice without having to change the settings. (But you can still do that if you want.)

Thank you for your patience, and for the detailed explanation/video.

@JesseTG
Copy link
Owner

JesseTG commented Jun 24, 2024

I think this is what I'm gonna do:

  • I will draw the cursor anywhere on the RetroArch screen, even if it's not actually over the touch screen.
  • If the cursor is over the touch screen area (or either area, if using bottom-focused hybrid mode), the cursor will be solid as it is now. Otherwise it will just be an outline.

@JesseTG
Copy link
Owner

JesseTG commented Jun 24, 2024

I noticed that you're using the 3:1 hybrid ratio; does the issue occur if you use 2:1? I just discovered a bug with the 3:1 ratio, and I suspect that's what you've been encountering.

@DarkSide1305
Copy link
Author

Nope, still the same issue. Doesnt matter if im on 2:1 or 3:1, it still only reacts to the "True Cursor" you see in the RetroArch Menu, not to the one thats shown in MelonDSDS (that as talked about is buggy itself and renders wrongly which you already know about)

@JesseTG
Copy link
Owner

JesseTG commented Jun 25, 2024

Ah, I see. I ask because I noticed a crash bug when using 3:1 in debug builds, and I was wondering if that was related. It seems not. (Don't worry, it's fixed.)

@JesseTG JesseTG added this to the Update to the latest `master` milestone Jun 26, 2024
@JesseTG JesseTG removed this from the Update to the latest `master` milestone Aug 19, 2024
@bryanflynn2017
Copy link

bryanflynn2017 commented Aug 27, 2024

I wasn't sure if you meant was actually fixed, but I'm also having the issue (using v.1.1.7 currently). The cursor does not 'tap' where it is pointed while using the right analog, and it's only the case for "Hybrid (Focus Bottom)" mode. Just curious...

@DarkSide1305
Copy link
Author

I assume Jesse meant the 3:1 crash bug is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working input For issues related to input.
Projects
Status: No status
Development

No branches or pull requests

3 participants