From 66408308b83e8a9de4a68d99fe71b2d0991633b6 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 13 Jan 2025 09:49:03 -0800 Subject: [PATCH] Added documentation for mouse handling in relative mode Fixes https://github.com/libsdl-org/SDL/issues/11805 --- include/SDL3/SDL_mouse.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/SDL3/SDL_mouse.h b/include/SDL3/SDL_mouse.h index e6d09bfc06..0dfbbb6061 100644 --- a/include/SDL3/SDL_mouse.h +++ b/include/SDL3/SDL_mouse.h @@ -359,6 +359,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WarpMouseGlobal(float x, float y); * report continuous relative mouse motion even if the mouse is at the edge of * the window. * + * If you'd like to keep the mouse position fixed while in relative mode you can use SDL_SetWindowMouseRect(). If you'd like the cursor to be at a specific location when relative mode ends, you should use SDL_WarpMouseInWindow() before disabling relative mode. + * * This function will flush any pending mouse motion for this window. * * \param window the window to change.