Procházet zdrojové kódy

Only clear the raw input queue status if we don't call GetRawInputBuffer()

GetRawInputBuffer() will do that for us when we read all the queued events
Sam Lantinga před 2 roky
rodič
revize
02c63667c7

+ 2 - 0
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 */
     /* Relative mouse motion is delivered to the window with keyboard focus */
     window = SDL_GetKeyboardFocus();
     window = SDL_GetKeyboardFocus();
     if (!window) {
     if (!window) {
+        // Clear the queue status so MsgWaitForMultipleObjects() will wait again
+        (void)GetQueueStatus(QS_RAWINPUT);
         return;
         return;
     }
     }
     data = window->driverdata;
     data = window->driverdata;

+ 0 - 3
src/video/windows/SDL_windowsrawinput.c

@@ -81,9 +81,6 @@ static DWORD WINAPI WIN_RawInputThread(LPVOID param)
             break;
             break;
         }
         }
 
 
-        /* Clear the queue status so MsgWaitForMultipleObjects() will wait again */
-        (void)GetQueueStatus(QS_RAWINPUT);
-
         WIN_PollRawInput(_this);
         WIN_PollRawInput(_this);
     }
     }