SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER(3)
π SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER π
okay bestie, welcome to the SDL3 hints saga, this one is a macro from <SDL3/SDL_hints.h> and it's literally the switch that decides whether SDL needs DRM master access before it'll even think about booting up the KMSDRM video backend. no cap. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_hints.h>
#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
that's it, that's the whole vibe. it's a string define, you set it by that exact name, don't get creative with the spelling or it will simply not work. π
πΈ DESCRIPTION πΈ
so the DRM subsystem has this whole concept of a "DRM master" β it's basically the DRM client that gets to set planes, set the cursor, all the main-character stuff. π
when SDL is the DRM master, it can draw to the screen using the SDL rendering APIs. slay.
when SDL is not the DRM master, it can still process input and query the attributes of attached displays, but it cannot change display state and it cannot draw to the screen directly. it's giving "i'm here but i'm not allowed to touch anything." π
so why would anyone want that?? bestie, sometimes you do want the KMSDRM backend even when it can't render. an app might want to use SDL for input processing while it renders with a totally different API β like an MMAL overlay on Raspberry Pi β or it might use its own code to draw to DRM overlays that SDL doesn't support. iykyk. π¦
the variable can be set to the following values:
"0"β SDL will allow usage of the KMSDRM backend without DRM master. π«Ά"1"β SDL will require DRM master to use the KMSDRM backend. this one is the default. π
β οΈ set this hint before SDL is initialized. like, before. not during, not after, before. it's a vibe check that happens at init time and if you're late you're just late. π
π AVAILABILITY π
this hint is available since SDL 3.2.0. so if you're on something older, sorry babe, no hint for you. π
π SEE ALSO π
no extra references on this one, it's just her and the hint registry. sometimes a page is a solo act. β¨
and that's the whole page, periodt. π this little icon of a manual page came to you from Simple Directmedia Layer, living its best life as part of SDL 3.4.18 β mwah, take care of her, and remember: set the hint before init or she will simply not hear you. π¦π
π¦ 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