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.

(cherry picked from commit 8fcbf972c6)
This commit is contained in:
Frank Praznik 2024-08-16 11:12:10 -04:00
parent 74a005f73f
commit f79d28085d
No known key found for this signature in database
1 changed files with 1 additions and 0 deletions

View File

@ -595,6 +595,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);
}
}