SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK(3)
π SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK(3) π
okay bestie, so this is one of those SDL3 hints β the lil environment-variable-ish knobs you set before SDL wakes up β and this one is called SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK. It's giving "backup plan energy," and honestly? Iconic. π
β¨ NAME β¨
SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK β literally the setting that says: if eglGetPlatformDisplay fails, fall back to calling eglGetDisplay. π¦
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_hints.h>
#define SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK"
like. that's the whole vibe. include the header, and the macro name is just the string of itself (yes queen, it's self-titled, main character behavior π ).
π DESCRIPTION π
so the way this works is, you can set this variable to one of these values, no cap:
"0"β do NOT fall back toeglGetDisplay. nope. not doing it. π"1"β fall back toeglGetDisplayifeglGetPlatformDisplayfails. (default) β¨
β οΈ important bestie: this hint should be set before SDL is initialized. Like, before. If you're setting it after init, you're late to the party and the party already left. π
π«Ά AVAILABILITY π«Ά
this hint is available since SDL 3.2.0. so if you're on something older... girl. upgrade. π§
okay that's the whole page, and that's on periodt. this was brought to you by the lovely humans of Simple Directmedia Layer, documented in SDL 3.4.18 β stay slay, set your hints before init, and remember: eglGetDisplay has your back when eglGetPlatformDisplay ghosts 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