SDL_EGL_GetCurrentDisplay(3)

πŸ’– SDL_EGL_GetCurrentDisplay πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_EGL_GetCurrentDisplay β€” she's here to get you the currently active EGL display. that's it, that's the whole job. short king. πŸ‘‘


✨ NAME ✨

SDL_EGL_GetCurrentDisplay β€” get the currently active EGL display. no cap, that's literally what she does. πŸ¦‹


✨ SYNOPSIS ✨

#include <SDL3/SDL_video.h>

SDL_EGLDisplay SDL_EGL_GetCurrentDisplay(void);

so you pull in the header, you call her with zero arguments, and she hands you back an SDL_EGLDisplay. no parameters, no drama. πŸ’…


✨ RETURN VALUE ✨

she returns the currently active EGL display, or NULL if things went sideways 😭 β€” and if you get that NULL, bestie, do NOT just sit there guessing what happened. call SDL_GetError() for more information. she'll tell you. fr fr. 🫢


✨ THREAD SAFETY ✨

🚨 okay important: this function should only be called on the main thread. do not try to be cute and call her from a worker thread. she does not want that energy. πŸ›‘

✨ AVAILABILITY ✨

this function is available since SDL 3.2.0. so if you're on anything older... yeah, no. upgrade era. ⭐


and that's the whole page, you're welcome πŸ’œ

Simple Directmedia Layer β€” SDL 3.4.18 β€” SDL_EGL_GetCurrentDisplay(3) πŸŽ€

mwah, go call SDL_GetError() when it returns NULL, i'm so serious. bye bestie! πŸŒΈπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from