Scroll to navigation

SDL_SetRelativeMouseTransform(3) SDL3 FUNCTIONS SDL_SetRelativeMouseTransform(3)

NAME

SDL_SetRelativeMouseTransform - 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

a callback used to transform relative mouse motion, or NULL for default behavior.
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.

SDL 3.3.0 Simple Directmedia Layer