SDL_HINT_DISPLAY_USABLE_BOUNDS(3)

πŸ’– NAME πŸ’–

SDL_HINT_DISPLAY_USABLE_BOUNDS β€” the lil override hint for SDL_GetDisplayUsableBounds(), bestie. That's literally it, that's the whole job.


✨ SYNOPSIS ✨

#include <SDL3/SDL_hints.h>

#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"

🌸 DESCRIPTION 🌸

okay so listen. If you set this hint, it overrides the results you'd normally expect from SDL_GetDisplayUsableBounds() β€” but only for display index 0. Just the first one. Not the others. Display zero and nobody else, periodt.

Generally you don't want to do this β€” like, fr fr, this is not the move for a normal app, it's giving "I know something you don't." But the whole point is that it lets an embedded system ask for some of the screen to be reserved for other uses, and that only works out when it's paired with a well-behaved application. Both halves gotta cooperate, iykyk. πŸ’…

And the value you hand it? It must be 4 comma-separated integers, in this exact order:

  1. the bounds x πŸ¦‹
  2. then y πŸ¦‹
  3. then width πŸ¦‹
  4. then height πŸ¦‹

in that order, no skipping, no reordering, no extra vibes. πŸ’€

Heads up bestie: this hint can be set anytime. No waiting for a specific init moment, it's flexible like that. 🫢

⭐ AVAILABILITY ⭐

This hint is available since SDL 3.2.0. πŸ‘‘


and that's the whole page, bestie!! written by the Simple Directmedia Layer girlies, rocking SDL 3.4.18 β€” go reserve some screen space responsibly, mwah πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from