Bug #132 ยป 0026-sdl3-Base-create_surf_with_format-on-SDL_CreateSurfa.patch
client/gui-sdl3/graphics.c | ||
---|---|---|
/**********************************************************************//**
|
||
Create an surface with format
|
||
MUST NOT BE USED IF NO SDLSCREEN IS SET
|
||
**************************************************************************/
|
||
SDL_Surface *create_surf_with_format(SDL_PixelFormat *pf,
|
||
int width, int height)
|
||
{
|
||
SDL_Surface *surf = SDL_CreateSurfaceFrom(NULL, width, height,
|
||
0, pf->format);
|
||
SDL_Surface *surf = SDL_CreateSurface(width, height, pf->format);
|
||
if (surf == NULL) {
|
||
log_error(_("Unable to create Sprite (Surface) of size "
|