SDL_SurfaceHasColorKey - Man Page

Returns whether the surface has a color key.

Synopsis

#include <SDL3/SDL_surface.h>

bool SDL_SurfaceHasColorKey(SDL_Surface *surface);

Description

It is safe to pass a NULL surface here; it will return false.

Function Parameters

surface

the SDL_Surface structure to query.

Return Value

Returns true if the surface has a color key, false otherwise.

Thread Safety

It is safe to call this function from any thread.

Availability

This function is available since SDL 3.2.0.

See Also

SDL_SetSurfaceColorKey(3), SDL_GetSurfaceColorKey(3)

Referenced By

SDL_GetSurfaceColorKey(3), SDL_SetSurfaceColorKey(3).

SDL 3.2.16 Simple Directmedia Layer SDL3 FUNCTIONS