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:
Sylvain Becker
2022-11-29 18:40:09 +01:00
committed by GitHub
parent 6873082c34
commit fc4fc5295f
30 changed files with 95 additions and 109 deletions

View File

@@ -500,7 +500,7 @@ SDLgfx_rotateSurface(SDL_Surface * src, double angle, int smooth, int flipx, int
rz_dst = NULL;
if (is8bit) {
/* Target surface is 8 bit */
rz_dst = SDL_CreateRGBSurfaceWithFormat(0, rect_dest->w, rect_dest->h + GUARD_ROWS, 8, src->format->format);
rz_dst = SDL_CreateRGBSurfaceWithFormat(rect_dest->w, rect_dest->h + GUARD_ROWS, src->format->format);
if (rz_dst != NULL) {
if (src->format->palette) {
for (i = 0; i < src->format->palette->ncolors; i++) {
@@ -511,7 +511,7 @@ SDLgfx_rotateSurface(SDL_Surface * src, double angle, int smooth, int flipx, int
}
} else {
/* Target surface is 32 bit with source RGBA ordering */
rz_dst = SDL_CreateRGBSurface(0, rect_dest->w, rect_dest->h + GUARD_ROWS, 32,
rz_dst = SDL_CreateRGBSurface(rect_dest->w, rect_dest->h + GUARD_ROWS, 32,
src->format->Rmask, src->format->Gmask,
src->format->Bmask, src->format->Amask);
}