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

Mobile browser touch events #16

Closed
clinuxrulz opened this issue Jan 25, 2024 · 4 comments
Closed

Mobile browser touch events #16

clinuxrulz opened this issue Jan 25, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@clinuxrulz
Copy link
Contributor

clinuxrulz commented Jan 25, 2024

When targeting Web Assembly then running it on a mobile browser, it seems this plugin is looking for mouse events instead of touch events.

Maybe for desktop PC it should look for both touch events and mouse events. Plenty of laptops have touch screen these days.

std::env::consts::OS contains an empty string for the Web Assembly target.

@clinuxrulz clinuxrulz added the bug Something isn't working label Jan 25, 2024
@clinuxrulz
Copy link
Contributor Author

clinuxrulz commented Jan 25, 2024

To avoid complicated state management one way could be:

  • If joystick starts interacting with mouse, ignore touch events until mouse lets go of joystick.
  • If joystick starts interacting with touch, ignore mouse events until touch lets go of joystick.

Here is a suggested solution: #17

@SergioRibera
Copy link
Owner

Hi @clinuxrulz, I'm really sorry for the delay in answering you, I've been very busy preparing material for a talk I'm going to give.

I was contemplating this problem, and I was thinking about removing the validation, but now that you propose a solution, let me take a look at it.

@SergioRibera
Copy link
Owner

SergioRibera commented Jan 27, 2024

@clinuxrulz It seems to me that with PR #17 complete, we can now close this issue, right?

@clinuxrulz
Copy link
Contributor Author

Yes. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants