SDL_SurfaceHasColorKey(3)
β¨ SDL_SurfaceHasColorKey β¨
okay bestie, welcome to the SDL_SurfaceHasColorKey(3) page, part of the SDL3 FUNCTIONS lineup π this one is a tiny lil detective function and honestly? she's giving low-effort-high-reward energy. no cap.
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_surface.h>
bool SDL_SurfaceHasColorKey(SDL_Surface *surface);
like, that's it. that's the whole thing. one line. a queen of minimalism π
π DESCRIPTION π
so basically this function tells you whether the surface has a color key. that's the whole vibe check. yes or no. has one, or doesn't. π
and here's the cute part: it is safe to pass a NULL surface here β it will return false. no crash, no drama, no segmentation fault girlboss moment. she just goes "nope, no color key" and moves on with her life. iconic behavior fr fr π«Ά
π¦ FUNCTION PARAMETERS π¦
surfaceβ theSDL_Surfacestructure you're querying, aka the thing you want the tea about. β
π RETURN VALUE π
- Returns
trueif the surface has a color key falseotherwise
periodt. binary. no in-between. π
π§ THREAD SAFETY π§
it is safe to call this function from any thread. yes literally any of them. go wild, spawn threads, do your thing, she can handle it. β¨
β AVAILABILITY β
this function is available since SDL 3.2.0. so if you're on something older... bestie, upgrade. π
π SEE ALSO π
SDL_SetSurfaceColorKey(3)β for when you wanna set the thingSDL_GetSurfaceColorKey(3)β for when you wanna get the actual value
iykyk π
and that's the whole page!! ty for reading, mwah π this was SDL_SurfaceHasColorKey(3), brought to you by Simple Directmedia Layer, running the SDL 3.4.18 era, and she is thriving. go forth and query your surfaces, bestie πβ¨
π¦ 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