sdlSurfaceHasAlternateImages function

bool sdlSurfaceHasAlternateImages(
  1. Pointer<SdlSurface> surface
)

Return whether a surface has alternate versions available.

\param surface the SDL_Surface structure to query. \returns true if alternate versions are available or false otherwise.

\since This function is available since SDL 3.1.3.

\sa SDL_AddSurfaceAlternateImage \sa SDL_RemoveSurfaceAlternateImages \sa SDL_GetSurfaceImages

extern SDL_DECLSPEC bool SDLCALL SDL_SurfaceHasAlternateImages(SDL_Surface *surface)

Implementation

bool sdlSurfaceHasAlternateImages(Pointer<SdlSurface> surface) {
  final sdlSurfaceHasAlternateImagesLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlSurface> surface),
      int Function(
          Pointer<SdlSurface> surface)>('SDL_SurfaceHasAlternateImages');
  return sdlSurfaceHasAlternateImagesLookupFunction(surface) == 1;
}