From 1f8f659dd9d40e4612373a4aa20c7e098ac55219 Mon Sep 17 00:00:00 2001
From: expikr <77922942+expikr@users.noreply.github.com>
Date: Mon, 13 Jan 2025 15:02:45 +0800
Subject: [PATCH] don't warp mouse on exiting relative mode

---
 src/events/SDL_mouse.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index bfdabb9fff224..2ef587e32da98 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -1249,12 +1249,6 @@ bool SDL_SetRelativeMouseMode(bool enabled)
 
     if (focusWindow) {
         SDL_UpdateWindowGrab(focusWindow);
-
-        // Put the cursor back to where the application expects it
-        if (!enabled) {
-            SDL_PerformWarpMouseInWindow(focusWindow, mouse->x, mouse->y, true);
-        }
-
         SDL_UpdateMouseCapture(false);
     }