From e0df963ef0ffd517d7ed09b4acd335177ceede0d Mon Sep 17 00:00:00 2001 From: Susko3 Date: Tue, 26 Dec 2023 21:21:17 +0100 Subject: [PATCH] Fix wrong bit count in comment If we're counting bits from 0, then the MSB is bit 31! --- 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 3a950a26a..36a042c80 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -411,7 +411,7 @@ static SDL_MOUSE_EVENT_SOURCE GetMouseMessageSource(void) LPARAM extrainfo = GetMessageExtraInfo(); /* Mouse data (ignoring synthetic mouse events generated for touchscreens) */ /* Versions below Vista will set the low 7 bits to the Mouse ID and don't use bit 7: - Check bits 8-32 for the signature (which will indicate a Tablet PC Pen or Touch Device). + Check bits 8-31 for the signature (which will indicate a Tablet PC Pen or Touch Device). Only check bit 7 when Vista and up(Cleared=Pen, Set=Touch(which we need to filter out)), when the signature is set. The Mouse ID will be zero for an actual mouse. */ if (IsTouchEvent(extrainfo)) {