SDL_AddSurfaceAlternateImage - Man Page
Add an alternate version of a surface.
Synopsis
#include <SDL3/SDL_surface.h> bool SDL_AddSurfaceAlternateImage(SDL_Surface *surface, SDL_Surface *image);
Description
This function adds an alternate version of this surface, usually used for content with high DPI representations like cursors or icons. The size, format, and content do not need to match the original surface, and these alternate versions will not be updated when the original surface changes.
This function adds a reference to the alternate version, so you should call SDL_DestroySurface() on the image after this call.
Function Parameters
- surface
the SDL_Surface structure to update.
- image
a pointer to an alternate SDL_Surface to associate with this surface.
Return Value
for more information.
Thread Safety
This function is not thread safe.
Availability
This function is available since SDL 3.2.0.
See Also
SDL_RemoveSurfaceAlternateImages(3), SDL_GetSurfaceImages(3), SDL_SurfaceHasAlternateImages(3)
Referenced By
SDL_GetSurfaceImages(3), SDL_RemoveSurfaceAlternateImages(3), SDL_SurfaceHasAlternateImages(3).