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

[question] How to deal with touscreen and USB mouse in the same application (Android) #11851

Open
MVoloshin opened this issue Jan 4, 2025 · 1 comment

Comments

@MVoloshin
Copy link

I tried to build Bochs (https://github.com/bochs-emu/Bochs) for Android with https://github.com/pelya/commandergenius and saw following results:

  1. SDL-1.2 build: phone's touchscreen works fine, but unable to move cursor with external USB mouse (right and left button work fine in both cases).
  2. SDL2 build: with touchscreen cursor misbehaves (chaotically moves), external USB mouse works fine (right and left button work fine in both cases).
    Note: without relative mode enabled neither touchscreen nor external mouse works.

Device: Redmi 10C, Android 13
Could you tell me what should I do to make both phone's touchscreen and external USB mouse work?

@icculus
Copy link
Collaborator

icculus commented Jan 9, 2025

SDL2 will send one-finger touches as mouse events in case that gets phones to work with desktop apps without changes. If Bochs is looking for both touch events and mouse events (and not throwing away the mouse events that have a which field of SDL_TOUCH_MOUSEID), it might be getting confused between the two.

I'd check that first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants