From c03c01e9b21cb9c38fe7f09899895708ca95d128 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 4 Jan 2024 09:12:37 -0800 Subject: [PATCH] Make sure we get mouse events as soon as possible --- src/video/windows/SDL_windowsmouse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video/windows/SDL_windowsmouse.c b/src/video/windows/SDL_windowsmouse.c index a078e039d2..07625887db 100644 --- a/src/video/windows/SDL_windowsmouse.c +++ b/src/video/windows/SDL_windowsmouse.c @@ -68,6 +68,9 @@ static DWORD WINAPI WIN_RawMouseThread(LPVOID param) return 0; } + /* Make sure we get mouse events as soon as possible */ + SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL); + /* Tell the parent we're ready to go! */ SetEvent(thread_data.ready_event);