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