SDL_GETWINDOWRELATIVEMOUSEMODE(3)

πŸ’– SDL_GetWindowRelativeMouseMode πŸ’–

okay bestie so we're deep in the SDL3 FUNCTIONS manual, and this lil page right here is SDL_GetWindow...tiveMouseMode(3) (yes the header truncates it, it's just built different, the full name is in the title up there ⬆️). Pull up a chair, we're checking on your mouse vibes. 🐭✨


🌸 NAME 🌸

SDL_GetWindowRelativeMouseMode β€” query whether relative mouse mode is enabled for a window.

like, is your mouse doing the relative thing or not. that's the whole assignment. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_mouse.h>

bool SDL_GetWindowRelativeMouseMode(SDL_Window *window);

one include, one function call, zero drama. we love a low-maintenance queen. πŸ‘‘


πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • window β€” the window to query. literally just hand it the window you're curious about, it's not that deep. πŸͺŸ

✨ RETURN VALUE ✨

Returns true if relative mode is enabled for a window, or false otherwise.

that's it. that's the tea. a whole boolean. no error codes, no secret third option, just yes or no. πŸ“


πŸ”₯ THREAD SAFETY πŸ”₯

⚠️ This function should only be called on the main thread.

not me calling it from a worker thread and starting a whole situation 😭 bestie do NOT do that. main thread only. periodt.


πŸ‘‘ AVAILABILITY πŸ‘‘

This function is available since SDL 3.2.0. πŸ—“οΈ

if you're on anything older, sorry babe, it's giving "not yet". upgrade arc when? 🌈


🫢 SEE ALSO 🫢


mwah, that's the whole page, you ate it πŸŽ€πŸ§š

anyway this lil diva of a manpage came from Simple Directmedia Layer, version SDL 3.4.18 β€” shoutout to the source, couldn't have done it without you. πŸ’– bye bestie, go enable some relative mouse mode (or don't, that's the other function's job) ✨

πŸ“¦ where this page comes from