SDL_HINT_ORIENTATIONS(3)

✨ SDL_HINT_ORIENTATIONS ✨

okay bestie, welcome to the SDL_HINT_ORIENTATIONS page from the SDL3 FUNCTIONS manual πŸ’– this is the lil hint that tells your app which way it's allowed to spin. screen rotation drama, but make it intentional.


🌸 NAME 🌸

SDL_HINT_ORIENTATIONS β€” a variable controlling which orientations are allowed on iOS/Android 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_hints.h>

#define SDL_HINT_ORIENTATIONS "SDL_ORIENTATIONS"

πŸ’… DESCRIPTION πŸ’…

so like. sometimes you genuinely need to explicitly control which UI orientations are allowed. not vibes-based rotation. explicit control. no cap.

this variable is a space delimited list of the following values:

  • "LandscapeLeft"
  • "LandscapeRight"
  • "Portrait"
  • "PortraitUpsideDown"

and the way that this hint should be set before SDL is initialized? yeah. before. set it early or it's giving nothing, fr fr πŸ™ˆ

⚠️ reminder: set this hint before SDL is initialized. not after. before. πŸ’€

πŸ‘‘ AVAILABILITY πŸ‘‘

this hint is available since SDL 3.2.0. periodt. ✨


Simple Directmedia Layer Β· SDL 3.4.18 Β· SDL_HINT_ORIENTATIONS(3) β€” k that's the whole page bestie, go set your hint before init and slay πŸ’–πŸŽ€πŸ¦‹πŸŒˆ

πŸ“¦ where this page comes from