SDL_GetCurrentVideoDriver(3)

✨ SDL_GetCurrentVideoDriver(3) ✨

okay bestie, so this is a page from the SDL3 FUNCTIONS manual, and it's literally the shortest lil glow-up you've ever seen πŸ’– it tells you how to ask SDL "hey girl, which video driver are we running rn?" β€” and that's it, that's the whole vibe. no cap.


πŸŽ€ NAME πŸŽ€

SDL_GetCurrentVideoDriver β€” get the name of the currently initialized video driver. that's it. that's her whole job 🫢


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_video.h>

const char * SDL_GetCurrentVideoDriver(void);

no args, no drama, just vibes πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so the names of drivers are all simple, low-ASCII identifiers β€” think "cocoa", "x11", or "windows". cute, right?

these names never have Unicode characters in them, bestie. not even one lil emoji ✨ and highkey important: they are not meant to be proper names. so don't go putting them on a birth certificate or whatever, they're just internal identifier strings, iykyk 🌈


πŸ’– RETURN VALUE πŸ’–

returns the name of the current video driver... or NULL if no driver has been initialized 😭 (yes, that's the sad path, and yes, you should check for it, fr fr).


πŸ”₯ THREAD SAFETY πŸ”₯

this function should only be called on the main thread. periodt. main character energy only, no side quests on other threads πŸ™ˆ


⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0 β€” so if you're on anything older, sorry babe, she doesn't exist yet πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, they're the sibling icons 🌟


kisses, bestie πŸ’œ this was written for the Simple Directmedia Layer crew, SDL 3.4.18 era, and yeah that's the version and the source, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from