From bbe4d693eb0642c8011d1936d40185e4b5669eb7 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Tue, 26 Dec 2023 21:08:51 +0100 Subject: [PATCH] Use correct touch check flag Matches the one in `GetMouseMessageSource()`. From my testing on Windows 11, the lower 8 bits in touch events cycle trough the values 0x8c-0x95 in order. (cherry picked from commit d747daf03d3210a794d609b8cc662f28beaedaf6) --- src/video/windows/SDL_windowsevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index b15487e69..e58bc390e 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -853,7 +853,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) SDL_MouseID mouseID; RAWMOUSE *rawmouse; if (SDL_GetNumTouchDevices() > 0 && - (GetMouseMessageSource() == SDL_MOUSE_EVENT_SOURCE_TOUCH || (GetMessageExtraInfo() & 0x82) == 0x82)) { + (GetMouseMessageSource() == SDL_MOUSE_EVENT_SOURCE_TOUCH || (GetMessageExtraInfo() & 0x80) == 0x80)) { break; } /* We do all of our mouse state checking against mouse ID 0