mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-18 10:48:28 +00:00
SDL API renaming: SDL_pixels.h
Fixes https://github.com/libsdl-org/SDL/issues/6886
This commit is contained in:
parent
3d063d7295
commit
083e436a1a
18 changed files with 126 additions and 96 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue