SDL_DisplayOrientation(3type)
π SDL_DisplayOrientation π
okay so bestie, welcome to the SDL3 DATATYPES corner of the manual, and today's main character is SDL_DisplayOrientation β literally just the vibes of which way your screen is turned. that's it. that's the whole job. and yet it matters SO much, because nothing ruins a cute setup like rendering everything sideways. π
β¨ NAME β¨
SDL_DisplayOrientation β display orientation values; the way a display is rotated.
like, the way your display is rotated. the angle. the twist. the ~leaning~. slay. π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_video.h>
typedef enum SDL_DisplayOrientation
{
SDL_ORIENTATION_UNKNOWN, /**< The display orientation can't be determined */
SDL_ORIENTATION_LANDSCAPE, /**< The display is in landscape mode, with the right side up, relative to portrait mode */
SDL_ORIENTATION_LANDSCAPE_FLIPPED, /**< The display is in landscape mode, with the left side up, relative to portrait mode */
SDL_ORIENTATION_PORTRAIT, /**< The display is in portrait mode */
SDL_ORIENTATION_PORTRAIT_FLIPPED /**< The display is in portrait mode, upside down */
} SDL_DisplayOrientation;
πΈ the values, one by one, no skips πΈ
not me going through every single enumerator because we do NOT leave anyone behind in this house π«Ά
SDL_ORIENTATION_UNKNOWNβ the display orientation can't be determined. it's giving mystery. it's giving "idk her". shrug and move on, bestie πSDL_ORIENTATION_LANDSCAPEβ the display is in landscape mode, with the right side up, relative to portrait mode. wide mode, right side up. the classic. the icon. πSDL_ORIENTATION_LANDSCAPE_FLIPPEDβ the display is in landscape mode, with the left side up, relative to portrait mode. same landscape energy, but flipped so the left side is the one facing up. note that it's relative to portrait mode, okay? don't come for me, that's literally what it says. π¦SDL_ORIENTATION_PORTRAITβ the display is in portrait mode. tall mode. upright. standing on business. βSDL_ORIENTATION_PORTRAIT_FLIPPEDβ the display is in portrait mode, upside down. tall mode but fully flipped, upside down, chaotic in the best way π
lowkey the whole enum is just "which way is up" and honestly? relatable. sometimes I don't know which way is up either.
π AVAILABILITY π
this enum is available since SDL 3.2.0. so if you're on anything older, it's not there, and no amount of manifesting will summon it β¨
and that's the whole page, bestie!! every flag, every comment, every literal detail, preserved with love and zero skips π go forth and know which way your display is facing π
~ cute sign-off time ~ this lil page comes to you from Simple Directmedia Layer, living in the SDL 3.4.18 era, and it's filed under SDL_DisplayOrientation(3type). mwah. take care of her π«Άπ
π¦ 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