SDL_HideCursor(3)

✨ SDL_HideCursor ✨

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, today we're talking about SDL_HideCursor and honestly? it does exactly what it says on the tin πŸ’…


πŸŽ€ NAME πŸŽ€

SDL_HideCursor β€” hide the cursor. yes. that's it. that's the whole job. she's simple, she's iconic, she ate 🫢


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_mouse.h>

bool SDL_HideCursor(void);

no arguments, no drama, just vibes ✨


πŸ’– RETURN VALUE πŸ’–

  • returns true on success πŸ’š
  • returns false on failure 😭

and if it fails? call SDL_GetError() for more information, bestie, because she will NOT elaborate on her own. go ask her friend. πŸ‘‘


πŸ¦‹ THREAD SAFETY πŸ¦‹

lowkey important: this function should only be called on the main thread. do not try to be cute and call it from a worker thread, she does not play like that πŸ™ˆ

🌈 AVAILABILITY 🌈

this function is available since SDL 3.2.0 ✨ so if you're on something older... yeah. upgrade era. πŸ’…


⭐ SEE ALSO ⭐

go read those too, they're her sisters and they're all serving cursor-energy πŸŽ€


and that's the page, bestie!! brought to you by the fine folks at Simple Directmedia Layer, running SDL 3.4.18, and it's SDL_HideCursor(3) β€” mwah, periodt πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from