SDL_HINT_VIDEO_DRIVER(3)
π NAME π
SDL_HINT_VIDEO_DRIVER β bestie, it's a variable that tells SDL which video backend to use. That's it, that's the whole vibe. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_hints.h>
#define SDL_HINT_VIDEO_DRIVER "SDL_VIDEO_DRIVER"
π DESCRIPTION π
okay so, by default? SDL is out here doing the absolute most β it's gonna try all the available video backends in a reasonable order, one after another, until it finds one that actually works. iconic behavior honestly. π¦
but sometimes you're like. no. I want this one. and that's literally what this hint is for β it lets the app or the user force a specific target. like, say you're on Wayland but you lowkey want to try talking to the X server instead? boom. force "x11". problem solved, no cap. π
this hint also accepts a comma-separated list of driver names, and fr fr each one gets tried in the order you listed them during init β until one succeeds or all of them fail π. so the order matters, bestie, don't just be throwing names in there.
πΈ heads up!! this hint should be set before SDL is initialized. set it late and it's givingβ¦ nothing. π
π AVAILABILITY π
this hint has been around since SDL 3.2.0. so if you're on something older, sorry babe, you're on your own. π
written by the lovely humans over at Simple Directmedia Layer, shipped with SDL 3.4.18 π mwah, go slay your video backend choices, ily, bye!! π«Άβ¨
π¦ 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