SDL_DuplicateSurface(3)

NAME
SDL_DuplicateSurface - Creates a new surface identical to the existing surface.

HEADER FILE
Defined in SDL3/SDL_surface.h

SYNOPSIS
#include "SDL3/SDL.h"

SDL_Surface* SDL_DuplicateSurface(SDL_Surface *surface);

DESCRIPTION
The returned surface should be freed with SDL_DestroySurface ().

FUNCTION PARAMETERS

surface
    the surface to duplicate.

RETURN VALUE
Returns a copy of the surface, or NULL on failure; call SDL_GetError () for more information.

AVAILABILITY
This function is available since SDL 3.0.0.

SEE ALSO
SDL_DestroySurface(3)