SDL_GETCURRENTDISPLAYORIENTATION(3)
β¨ SDL_GetCurrentDisplayOrientation β¨
okay bestie, gather round, because we're doing the SDL3 man page thing π this one lives in the SDL3 FUNCTIONS section and it's literally called SDL_GetCurrentDisplayOrientation β say that five times fast, i dare you π«Ά
πΈ NAME πΈ
SDL_GetCurrentDisplayOrientation β get the orientation of a display.
like, which way is it facing, bestie. portrait? landscape? the whole vibe check π±π
π SYNOPSIS π
#include <SDL3/SDL_video.h>
SDL_DisplayOrientation SDL_GetCurrentDisplayOrientation(SDL_DisplayID displayID);
ok so you pull in <SDL3/SDL_video.h> and then you call it, and it hands you back an SDL_DisplayOrientation. simple. clean. iconic β¨
π¦ FUNCTION PARAMETERS π¦
displayIDβ the instance ID of the display you wanna query. yes, the instance ID, not the index, not the name, the ID πͺͺ you get these from the display functions, iykyk.
π RETURN VALUE π
it returns the SDL_DisplayOrientation enum value of the display. that's it, that's the tea β
but if it isn't available? it gives you SDL_ORIENTATION_UNKNOWN instead. so like, don't just assume you got a real answer β check for that unknown, bestie, or you're gonna have a bad time π
π₯ THREAD SAFETY π₯
this function should only be called on the main thread. periodt. no side-quest threads, no background chaos, main character thread only π
π AVAILABILITY π
this function is available since SDL 3.2.0. if you're on something older, sorry babe, it's not there π
β SEE ALSO β
SDL_GetDisplays(3)β go get yourself some display IDs first, you're gonna need 'em π
and that's the whole page, no cap π every flag, every param, every return value, all accounted for, we ate and left no crumbs π
mwah π this page came to you from Simple Directmedia Layer, SDL 3.4.18, and yes the header up top says SDL_GetCurren...ayOrientation(3) because terminals are dramatic and truncate things. stay oriented, bestie π§
π¦ 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