SDL_HINT_VID..._MODE_SCALING(3)
π SDL_HINT_VIDEO_WAYLAND_MODE_SCALING β the manual page, but make it cute
okay bestie, so this is a page from the SDL3 FUNCTIONS manual, and it's about one very specific little hint variable. buckle up, it's short but it's important π¦
β¨ NAME β¨
SDL_HINT_VIDEO_WAYLAND_MODE_SCALING β a variable that controls how modes with a non-native aspect ratio get displayed under Wayland. that's it, that's the whole job π
πΈ SYNOPSIS πΈ
like, literally just include the header and there's a define, periodt:
#include <SDL3/SDL_hints.h>
#define SDL_HINT_VIDEO_WAYLAND_MODE_SCALING "SDL_VIDEO_WAYLAND_MODE_SCALING"
see how the macro name and the string are the same words? iconic behavior tbh. no cap.
π DESCRIPTION π
so here's the tea π: when this hint is set, the scaling you asked for gets used whenever you're displaying fullscreen video modes that don't match the display's native aspect ratio. the way that this only works is contingent on compositor viewport support β so it's giving "depends on your compositor being chill about it", iykyk.
the variable can be set to these values, and you will be choosing one:
"aspect"β video modes get displayed scaled, in their proper aspect ratio, with black bars. letterboxing era π"stretch"β video modes get scaled to fill the entire display. this one is the default π«Ά"none"β video modes get displayed as1:1with no scaling at all. raw. unfiltered. main character energy.
β οΈ girly pop, listen: this hint should be set before creating a window. do not wait until after. that's the rule and I don't make them, I just relay them π
β AVAILABILITY β
this hint is available since SDL 3.2.0. so if you're on something olderβ¦ yeah no, it's not there, sorry babe π
that's the whole page bestie, you ate it π
Simple Directmedia Layer β SDL 3.4.18 β and that footer's the version + source tag for this page (no date on it, fr fr, so I'm not gonna invent one, that's a tech-claims no-no). bye pookie, go set your hint before the window πβ¨π
π¦ 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