Differentiate between Windows Ink (pen) and regular touch input

This commit is contained in:
Susko3 authored and Sam Lantinga committed 2022-11-23 10:09:08 -08:00
1 parent 34231f5ba0
commit 42796c56a9
1 file changed
+1 -1
+1 -1
View File
@@ -1339,7 +1339,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
/* TODO: Can we use GetRawInputDeviceInfo and HID info to
determine if this is a direct or indirect touch device?
*/
if (SDL_AddTouch(touchId, SDL_TOUCH_DEVICE_DIRECT, "") < 0) {
if (SDL_AddTouch(touchId, SDL_TOUCH_DEVICE_DIRECT, (input->dwFlags & TOUCHEVENTF_PEN) == TOUCHEVENTF_PEN ? "pen" : "touch") < 0) {
continue;
}