From 26d956da6a397a6557f1753639e2622af4befb85 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sun, 31 Jan 2021 21:00:52 -0500 Subject: [PATCH] Fix Mouse Jump Bug --- mods/src/compat/compat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/src/compat/compat.c b/mods/src/compat/compat.c index 68e207095..d1c2ab66d 100644 --- a/mods/src/compat/compat.c +++ b/mods/src/compat/compat.c @@ -326,6 +326,9 @@ HOOK(SDL_WM_GrabInput, SDL_GrabMode, (SDL_GrabMode mode)) { XFixesHideCursor(x11_display, x11_window); } XFlush(x11_display); + + // Set Last Mouse Position + glfwGetCursorPos(glfw_window, &last_mouse_x, &last_mouse_y); } return mode == SDL_GRAB_QUERY ? (glfwGetInputMode(glfw_window, GLFW_CURSOR) == GLFW_CURSOR_NORMAL ? SDL_GRAB_OFF : SDL_GRAB_ON) : mode; }