diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index bd4e11916..d0d8eca5d 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -674,6 +674,8 @@ void WIN_PollRawInput(SDL_VideoDevice *_this) /* Relative mouse motion is delivered to the window with keyboard focus */ window = SDL_GetKeyboardFocus(); if (!window) { + // Clear the queue status so MsgWaitForMultipleObjects() will wait again + (void)GetQueueStatus(QS_RAWINPUT); return; } data = window->driverdata; diff --git a/src/video/windows/SDL_windowsrawinput.c b/src/video/windows/SDL_windowsrawinput.c index ce39fe360..fe34f6ff9 100644 --- a/src/video/windows/SDL_windowsrawinput.c +++ b/src/video/windows/SDL_windowsrawinput.c @@ -81,9 +81,6 @@ static DWORD WINAPI WIN_RawInputThread(LPVOID param) break; } - /* Clear the queue status so MsgWaitForMultipleObjects() will wait again */ - (void)GetQueueStatus(QS_RAWINPUT); - WIN_PollRawInput(_this); }