SDL_SurfaceHasColorKey - Returns whether the surface has a color key.
Contents
Availability
This function is available since SDL 3.2.0.
Description
It is safe to pass a NULL surface here; it will return false.
Function Parameters
surface
the SDL_Surface
structure to query.
Header File
Defined in SDL3/SDL_surface.h
Name
SDL_SurfaceHasColorKey - Returns whether the surface has a color key.
Return Value
Returns true if the surface has a color key, false otherwise.
See Also
•(3), SDL_SetSurfaceColorKey(3), •(3), SDL_GetSurfaceColorKey(3) Simple Directmedia Layer SDL 3.2.10 SDL_SurfaceHasColorKey(3)
Synopsis
#include"SDL3/SDL.h"boolSDL_SurfaceHasColorKey(SDL_Surface*surface);
Thread Safety
It is safe to call this function from any thread.
