mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-18 18:58:27 +00:00
Remove depth field from SDL_CreateRGBSurfaceWithFormat and SDL_Create… (#6685)
* Remove depth field from SDL_CreateRGBSurfaceWithFormat and SDL_CreateRGBSurfaceWithFormatFrom * Removed unused 'flags' parameter from SDL_CreateRGBSurface and SDL_CreateRGBSurfaceWithFormat * Removed unused 'flags' parameter from SDL_ConvertSurface and SDL_ConvertSurfaceFormat
This commit is contained in:
parent
6873082c34
commit
fc4fc5295f
30 changed files with 95 additions and 109 deletions
|
@ -1485,7 +1485,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface)
|
|||
SDL_DestroyTexture(texture);
|
||||
return NULL;
|
||||
}
|
||||
temp = SDL_ConvertSurface(surface, dst_fmt, 0);
|
||||
temp = SDL_ConvertSurface(surface, dst_fmt);
|
||||
SDL_FreeFormat(dst_fmt);
|
||||
if (temp) {
|
||||
SDL_UpdateTexture(texture, NULL, temp->pixels, temp->pitch);
|
||||
|
@ -2131,7 +2131,7 @@ SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect,
|
|||
return ret;
|
||||
}
|
||||
|
||||
texture->locked_surface = SDL_CreateRGBSurfaceWithFormatFrom(pixels, real_rect.w, real_rect.h, 0, pitch, texture->format);
|
||||
texture->locked_surface = SDL_CreateRGBSurfaceWithFormatFrom(pixels, real_rect.w, real_rect.h, pitch, texture->format);
|
||||
if (texture->locked_surface == NULL) {
|
||||
SDL_UnlockTexture(texture);
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue