[GH-ISSUE #12] Increase pen MAX_X/MAX_Y resolution #4

Closed
opened 2026-10-15 12:51:05 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @cfalas on GitHub (Aug 8, 2024).
Original GitHub issue: https://github.com/games-on-whales/inputtino/issues/12

When working on higher resolution displays, pen accuracy is still limited to 1920x1080, which may lead to not-very-smooth lines.

Increasing MAX_X and MAX_Y in the code should fix this https://github.com/games-on-whales/inputtino/blame/stable/src/uinput/pentablet.cpp#L24-L25.

However, I'm not sure what a reasonable value for that is - some devices support subpixel precision, much higher than the resolution of their display. I don't think there's any disadvantage of setting this to a very large value, so perhaps we could just go for 65536x65536 or something like that?

Example of 65536x65536 instead of 1920x1080:
image

Originally created by @cfalas on GitHub (Aug 8, 2024). Original GitHub issue: https://github.com/games-on-whales/inputtino/issues/12 When working on higher resolution displays, pen accuracy is still limited to 1920x1080, which may lead to not-very-smooth lines. Increasing MAX_X and MAX_Y in the code should fix this https://github.com/games-on-whales/inputtino/blame/stable/src/uinput/pentablet.cpp#L24-L25. However, I'm not sure what a reasonable value for that is - some devices support subpixel precision, much higher than the resolution of their display. I don't think there's any disadvantage of setting this to a very large value, so perhaps we could just go for 65536x65536 or something like that? Example of 65536x65536 instead of 1920x1080: ![image](https://github.com/user-attachments/assets/d0dbcd13-38c4-4e45-a246-7b416c7942f2)
Author
Owner

@cfalas commented on GitHub (Aug 9, 2024):

If I understand the Android docs correctly, my tablet's digitizer has a fuzz of 0.3769x0.3769 pixels, with a range of 2960x1820 (which is the display resolution), which gives a resolution of ~7854x4830.

Let me know what you think a good value for the max is. Perhaps 19200x10800 might be good so that it matches the mouse config (and still looks smooth on my tablet)?

<!-- gh-comment-id:2277158192 --> @cfalas commented on GitHub (Aug 9, 2024): If I understand the Android docs correctly, my tablet's digitizer has a [fuzz](https://developer.android.com/reference/kotlin/android/view/InputDevice.MotionRange#getFuzz()) of 0.3769x0.3769 pixels, with a `range` of 2960x1820 (which is the display resolution), which gives a resolution of ~7854x4830. Let me know what you think a good value for the max is. Perhaps 19200x10800 might be good so that it matches the [mouse config](https://github.com/games-on-whales/inputtino/blob/stable/src/uinput/mouse.cpp#L22-L23) (and still looks smooth on my tablet)?
Author
Owner

@ABeltramo commented on GitHub (Aug 9, 2024):

I can't remember where originally I took those values, from a quick scan of the Wacom driver on the Linux kernel I couldn't find anything (I think that's where I was basing my assumptions).
I can't see anything wrong with changing it, the difference in the screenshot above is night and day, so I'd be happy to take a bigger default value.

<!-- gh-comment-id:2278648969 --> @ABeltramo commented on GitHub (Aug 9, 2024): I can't remember where originally I took those values, from a quick scan of the Wacom driver on the Linux kernel I couldn't find anything (I think that's where I was basing my assumptions). I can't see anything wrong with changing it, the difference in the screenshot above is night and day, so I'd be happy to take a bigger default value.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/inputtino#4
No description provided.