Function SDL_AddSurfaceAlternateImage
pub unsafe extern "C" fn SDL_AddSurfaceAlternateImage(
surface: *mut SDL_Surface,
image: *mut SDL_Surface,
) -> bool
Available on crate feature
dep_sdl3
only.Expand description
Add an alternate version of a surface.
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.
§Parameters
surface
: theSDL_Surface
structure to update.image
: a pointer to an alternateSDL_Surface
to associate with this surface.
§Return value
Returns true on success or false on failure; call SDL_GetError()
for more
information.
§Availability
This function is available since SDL 3.2.0.