SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE(3)
π SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE(3) π
okay bestie, sit down, we're talking about a hint from the SDL3 FUNCTIONS manual and it's lowkey one of those tiny switches that changes everything about how your game feels π
β¨ NAME β¨
SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE β a variable that controls whether the hardware cursor stays visible while relative mode is active π±οΈπ
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_hints.h>
#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"
yes bestie, that's the whole thing. one #define, one string, infinite vibes π
π¦ DESCRIPTION π¦
so this variable can be set to the following values, and there are literally only two, we love a binary moment:
"0"β the cursor will be hidden while relative mode is active. this is the default, no cap π«Ά"1"β the cursor will remain visible while relative mode is active β¨
now listen, here's the part where you gotta pay attention, because it's giving plot twist π
note that for systems without raw hardware inputs, relative mode is implemented using warping, so the hardware cursor will visibly warp between frames if this is enabled on those systems. so like. if you turn this on and your platform has no raw hardware input, your cursor is gonna be teleporting around frame to frame and it will look a mess. you've been warned, bestie π
and the good news? this hint can be set anytime. no timing drama, no "only before init" gatekeeping, just set it whenever you want, queen π
π AVAILABILITY π
this hint is available since SDL 3.2.0 β so if you're on something older, it's not you, it's the version π
π SEE ALSO π
nothing else listed here, this page is a solo act and honestly? main character energy β¨
and that's the whole page, bestie!! go forth and make your cursor behave however you want it to π
this lil rewrite came to you from the Simple Directmedia Layer crew, covering SDL 3.4.18 β mwah, catch you on the next manpage ππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms