mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Ignore synthetic mouse events generated for touchscreens
Windows generates fake raw mouse events for touchscreens for compatibility with legacy apps that predate touch support in Windows. We already handle touch events explicitly, so drop the synthetic events to avoid duplicates.
This commit is contained in:
parent
e841b066fd
commit
7e09718dfe
@ -552,8 +552,8 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
GetRawInputData(hRawInput, RID_INPUT, &inp, &size, sizeof(RAWINPUTHEADER));
|
||||
|
||||
/* Mouse data */
|
||||
if (inp.header.dwType == RIM_TYPEMOUSE) {
|
||||
/* Mouse data (ignoring synthetic mouse events generated for touchscreens) */
|
||||
if (inp.header.dwType == RIM_TYPEMOUSE && (GetMessageExtraInfo() & 0x80) == 0) {
|
||||
if (isRelative) {
|
||||
RAWMOUSE* rawmouse = &inp.data.mouse;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user