Closed hwsmm closed 2 months ago
I don't think we should be emulating mouse like this. We already have a mouse-from-touch emulation at an inputmanager level.
I guess we should probably fix OpenTabletDriverHandler first if we want to make separate events for tablets. https://github.com/ppy/osu-framework/blob/21cf5d077f953d6d7db5b05006da4ebf440c1a51/osu.Framework/Input/Handlers/Tablet/OpenTabletDriverHandler.cs#L91-L95
I don't think we should be emulating mouse like this. We already have a mouse-from-touch emulation at an inputmanager level.
Maybe I misunderstood, pen to me implies a pen/tablet flow rather than touch so (while untested) I'd see this as a good direction to see if it usable to us/users.
Maybe more my misunderstanding, but in that case I'm even more concerned this is going to be providing competing inputs with OTD. I guess we'll have to see how it works in practice, though I'd always favour OTD except for edgecases like apple pen (and even then I'd favour OTD if it gains support).
Pulls in https://github.com/ppy/SDL3-CS/pull/129
Due to SDL_pen API rework, SDL no longer produces mouse events for pen inputs. I tried emulating mouse in the above o!f branch, but I'm not sure if it's in the right direction. We cannot adjust output area in this API, so making another handler for this felt too much to me. Please give it a test/review!
You need to be on macOS/Linux(X11/Wayland) to test this since they don't have backends for other platforms yet. Disable in-game tablet driver, and use Artist Mode if you use desktop OTD on Linux before testing this.
SDL_bool
is now Cbool
and more widely used. Every function that returns error with SDL_SetError now returns SDL_bool instead of int. It probably needs review.