SDL API renaming: SDL_pixels.h

Fixes https://github.com/libsdl-org/SDL/issues/6886
This commit is contained in:
Sam Lantinga 2022-12-27 06:08:13 -08:00
parent 3d063d7295
commit 083e436a1a
18 changed files with 126 additions and 96 deletions

View file

@ -1436,13 +1436,13 @@ SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface)
SDL_Surface *temp = NULL;
/* Set up a destination surface for the texture update */
dst_fmt = SDL_AllocFormat(format);
dst_fmt = SDL_CreatePixelFormat(format);
if (dst_fmt == NULL) {
SDL_DestroyTexture(texture);
return NULL;
}
temp = SDL_ConvertSurface(surface, dst_fmt);
SDL_FreeFormat(dst_fmt);
SDL_DestroyPixelFormat(dst_fmt);
if (temp) {
SDL_UpdateTexture(texture, NULL, temp->pixels, temp->pitch);
SDL_FreeSurface(temp);