SDL_HINT_MOU...E_WARP_MOTION(3)

✨ SDL_HINT_MOUSE_RELATIVE_WARP_MOTION ✨

okay bestie, welcome to the SDL3 FUNCTIONS manual πŸ’… this one's a hint, and she's a very specific little queen, so let's get into it.


πŸŽ€ NAME πŸŽ€

SDL_HINT_MOUSE_RELATIVE_WARP_MOTION β€” a variable that controls whether a motion event should be generated for mouse warping while you're in relative mode. that's it, that's the whole job 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_hints.h>

#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"

🌸 DESCRIPTION 🌸

so the variable can be set to these values, and there are literally only two, no in-between, no grey area, she's decisive:

  • "0" β€” warping the mouse will NOT generate a motion event in relative mode πŸ™ˆ
  • "1" β€” warping the mouse WILL generate a motion event in relative mode πŸ”₯

by default, warping the mouse will not generate motion events in relative mode. and ngl that default is doing you a solid, because it means your application doesn't have to sit there filtering out giant relative motion numbers that only exist because of the warping. lowkey a lifesaver πŸ’–

this hint can be set anytime. no timing stress, no main-character scheduling drama, just set it whenever. ⭐

πŸ‘‘ AVAILABILITY πŸ‘‘

this hint has been available since SDL 3.2.0. so if you're on anything older, she's not there yet, sorry bestie 😭


and that's the whole page, periodt πŸ’… go forth and warp responsibly.

this lil drop of wisdom came to you from Simple Directmedia Layer, version SDL 3.4.18, and yes she ate πŸŽ€βœ¨

πŸ“¦ where this page comes from