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:
@@ -27,7 +27,7 @@ static SDL_bool is_packed_yuv_format(Uint32 format)
|
||||
/* Create a surface with a good pattern for verifying YUV conversion */
|
||||
static SDL_Surface *generate_test_pattern(int pattern_size)
|
||||
{
|
||||
SDL_Surface *pattern = SDL_CreateRGBSurfaceWithFormat(0, pattern_size, pattern_size, 0, SDL_PIXELFORMAT_RGB24);
|
||||
SDL_Surface *pattern = SDL_CreateRGBSurfaceWithFormat(pattern_size, pattern_size, SDL_PIXELFORMAT_RGB24);
|
||||
|
||||
if (pattern) {
|
||||
int i, x, y;
|
||||
@@ -325,7 +325,7 @@ main(int argc, char **argv)
|
||||
} else {
|
||||
filename = "testyuv.bmp";
|
||||
}
|
||||
original = SDL_ConvertSurfaceFormat(SDL_LoadBMP(filename), SDL_PIXELFORMAT_RGB24, 0);
|
||||
original = SDL_ConvertSurfaceFormat(SDL_LoadBMP(filename), SDL_PIXELFORMAT_RGB24);
|
||||
if (original == NULL) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", filename, SDL_GetError());
|
||||
return 3;
|
||||
@@ -337,7 +337,7 @@ main(int argc, char **argv)
|
||||
0, 100);
|
||||
pitch = CalculateYUVPitch(yuv_format, original->w);
|
||||
|
||||
converted = SDL_CreateRGBSurfaceWithFormat(0, original->w, original->h, 0, rgb_format);
|
||||
converted = SDL_CreateRGBSurfaceWithFormat(original->w, original->h, rgb_format);
|
||||
if (converted == NULL) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create converted surface: %s\n", SDL_GetError());
|
||||
return 3;
|
||||
|
||||
Reference in New Issue
Block a user