Skip to content

Conversation

Susko3
Copy link
Member

@Susko3 Susko3 commented Feb 24, 2025

This uses the GetSystemMetrics(SM_DIGITIZER) win32 API to get whether any connected tablets/pens are direct (NID_INTEGRATED_PEN) or indirect (NID_EXTERNAL_PEN).

The SDL code is modified to support reporting TabletPenDeviceType on a per-pen basis. This ensures that a pen type can't change while it's active, which would result in touches or left click getting stuck when using multiple pens at the same time.

Using multiple pens at the same time is not supported (the different pens will fight for the same cursor position), but at least it won't ever get inputs stuck.

Testing

On @Walavouchey's Microsoft Surface, the API returns, among other unrelated values, NID_INTEGRATED_PEN (discord).

My Wacom Intuos CTL-6100WL, with and without windows ink enabled in driver settings, is reported as both NID_INTEGRATED_PEN and NID_EXTERNAL_PEN. Which is a bit unexpected, but we can work with it.

The newly-added code paths aren't used with in-game OTD or with external OTD in default settings.
This may affect OTD with the windows ink plugin, but I would expect it to behave similar to the real wacom tablet, as it creates a virtual HID device.

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

Successfully merging this pull request may close these issues.

2 participants