Bug #160 ยป 0042-sdl3-Fix-copy_surface-memory-access-trouble.patch
client/gui-sdl3/graphics.c | ||
---|---|---|
**************************************************************************/
|
||
SDL_Surface *copy_surface(SDL_Surface *src)
|
||
{
|
||
return SDL_CreateSurfaceFrom(src->pixels, src->w, src->h, src->pitch,
|
||
src->format->format);
|
||
SDL_Surface *copy = SDL_CreateSurface(src->w, src->h, src->format->format);
|
||
alphablit(src, NULL, copy, NULL, 0);
|
||
return copy;
|
||
}
|
||
/* ============ Freeciv game graphics function =========== */
|