Fix Mouse Jump Bug
minecraft-pi-reborn/pipeline/head This commit looks good Details

This commit is contained in:
TheBrokenRail 2021-01-31 21:00:52 -05:00
parent 118bca3fa5
commit 26d956da6a
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}