SDL_GETNATURALDISPLAYORIENTATION(3)

πŸ’… NAME πŸ’…

SDL_GetNaturalDisplayOrientation β€” bestie, this one tells you how a display is oriented when it's sitting there unrotated. Like, its natural, no-extra-vibes state. πŸ¦‹


✨ SYNOPSIS ✨

#include <SDL3/SDL_video.h>

SDL_DisplayOrientation SDL_GetNaturalDisplayOrientation(SDL_DisplayID displayID);

🌸 FUNCTION PARAMETERS 🌸

  • displayID β€” the instance ID of the display you wanna query. Yes, that display. The one you're curious about. πŸ‘€

πŸŽ€ RETURN VALUE πŸŽ€

It hands you back the SDL_DisplayOrientation enum value of the display πŸ’– β€” or, if that info just isn't available, you get SDL_ORIENTATION_UNKNOWN instead. Not me getting ghosted by a display's orientation. 😭


πŸ”₯ THREAD SAFETY πŸ”₯

Okay so, important: this function should only be called on the main thread. Periodt. Don't be out here calling it from some random thread, that's not the vibe. 🚫🧡


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. So if you're on something older, sorry bestie, she's not there yet. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, no cap! ✨ This lil' slice of documentation came to you from Simple Directmedia Layer, rocking SDL 3.4.18. Go forth and query those displays, you icon. πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from