Support all generic tablets and not only OpenTabletDriver #31875
Replies: 3 comments 7 replies
-
ppy/osu-framework#6511 |
Beta Was this translation helpful? Give feedback.
-
First of all, SDL does not receive events from evdev, but from X11/Wayland. Receiving events from evdev requires an appropriate permission on most distros, too, as far as I know. Implementing this would require very hacky code. SDL just sends the pen events from the display server to the game, and osu! already handles them in their own way (but it is being reworked on as said in peppy's comment). In the other hand, OpenTabletDriver gets position data directly from the tablet itself, and translates it to in-game cursor position.
By the way, osu!lazer has full OpenTabletDriver implementation, and doesn't require installing desktop OpenTabletDriver. If it doesn't work for you, maybe try reading https://opentabletdriver.net/Wiki/FAQ/Linux. |
Beta Was this translation helpful? Give feedback.
-
So, are those two gonna be implemented? (y/n) This is mostly gonna benefit people owning generic HID tablets. This will also benefit people using styluses built into device screens when they are using an external monitor (mostly Chromebooks, Lenovo Yoga and Android tablets, hid-over-i2c). And of course me: the only smartass that decided to use a Chromebook as an input device for my other computer. |
Beta Was this translation helpful? Give feedback.
-
I have a literal standalone tablet that I grab stylus input from via
intercept
and then transfer over the network and put on my computer viauinput
(both fromintercept-tools
, Linux magic). It is recognized as a tablet in the OS and in art programs but not in Osu!, so I can't change the playing area. This gets very annoying very quickly.I suggest allowing to change the area for all generic tablets. I have no idea how the tablet settings menu works and why it tells me to install OpenTabletDriver, but SDL provides a really nice abstraction for all tablets (libevdev, mobile, windows...).
From SDL3 docs:
Just take the X and Y coordinates and then allow the user to map a range of that to the play field, effectively making a rectangle on the tablet correspond to the entire game window. Obviously, ignore mouse input when the pen is in proximity.
Also, I think the game lacks a little indication that a pen is even acting as one, I got an idea for that too. You know how pressing in on the pen/mouse makes the cursor rotate towards the center when restarting a match? Do the same but with actual tilt angles when in any of the menus.
From SDL3 docs (again):
Well, use SDL_PEN_AXIS_ROTATION to rotate the cursor and "stretch" it with the tilt values by adding them to the size of the cursor, or subtracting them from the starting position when negative. Perfect, now we know that it's actually recognized! Might also use pressure to make the cursor bigger/smaller but I think that would make it an accessibility issue because some tablets lie about the pressure and it would make the cursor too small.
I assume most of this should be implemented in Osu!framework. Should this also be an issue or..?
Beta Was this translation helpful? Give feedback.
All reactions