Pārlūkot izejas kodu

wayland: Send fake warp coordinates when emulating warps with relative mode

Send the fake warp coordinates when emulating warps with relative mode to ensure that it appears that the cursor is always reset to where the application expects it to be.

Fixes cases where games can continue moving the camera if the mouse is lifted during motion.
Frank Praznik 1 gadu atpakaļ
vecāks
revīzija
8fcbf972c6
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      src/video/wayland/SDL_waylandmouse.c

+ 1 - 0
src/video/wayland/SDL_waylandmouse.c

@@ -659,6 +659,7 @@ static void Wayland_WarpMouse(SDL_Window *window, int x, int y)
             Wayland_input_lock_pointer(input);
             input->relative_mode_override = SDL_TRUE;
         }
+        SDL_SendMouseMotion(window, 0, 0, x, y);
     }
 }