Parcourir la source

Don't send relative motion while in a modal loop

This fixes queuing up a bunch of relative motion events while moving or resizing a window.

(cherry picked from commit 2e61b4165286f5a4fcfecfb28dedc8589ae14c10)
Sam Lantinga il y a 3 semaines
Parent
commit
d73ad0ef18
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/video/windows/SDL_windowsevents.c

+ 1 - 1
src/video/windows/SDL_windowsevents.c

@@ -620,7 +620,7 @@ static void WIN_HandleRawMouseInput(Uint64 timestamp, SDL_VideoData *data, HANDL
 
     SDL_WindowData *windowdata = window->internal;
 
-    if (haveMotion) {
+    if (haveMotion && !windowdata->in_modal_loop) {
         if (!isAbsolute) {
             SDL_SendMouseMotion(timestamp, window, mouseID, true, (float)dx, (float)dy);
         } else {