SDL_SetRelativeMouseTransform - Man Page
Set a user-defined function by which to transform relative mouse inputs.
Synopsis
#include <SDL3/SDL_mouse.h> bool SDL_SetRelativeMouseTransform(SDL_MouseMotionTransformCallback callback, void *userdata);
Description
This overrides the relative system scale and relative speed scale hints. Should be called prior to enabling relative mouse mode, fails otherwise.
Function Parameters
- callback
a callback used to transform relative mouse motion, or NULL for default behavior.
- userdata
a pointer that will be passed to callback.
Return Value
Returns true on success or false on failure; call SDL_GetError() for more information.
Thread Safety
This function should only be called on the main thread.
Availability
This function is available since SDL 3.4.0.
Referenced By
SDL_MouseMotionTransformCallback.3type(3).
SDL 3.4.0 Simple Directmedia Layer SDL3 FUNCTIONS