Re-add SDL_assert() with non boolean ptr syntax (#8530)

This commit is contained in:
Sylvain Becker 2023-11-11 10:28:24 +01:00 committed by GitHub
parent b374105975
commit 04b6b2979f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 88 additions and 88 deletions

View file

@ -353,21 +353,21 @@ static int surface_testCompleteSurfaceConversion(void *arg)
for (i = 0; i < SDL_arraysize(pixel_formats); ++i) {
for (j = 0; j < SDL_arraysize(pixel_formats); ++j) {
fmt1 = SDL_CreatePixelFormat(pixel_formats[i]);
SDL_assert(fmt1);
SDL_assert(fmt1 != NULL);
cvt1 = SDL_ConvertSurface(face, fmt1);
SDL_assert(cvt1);
SDL_assert(cvt1 != NULL);
fmt2 = SDL_CreatePixelFormat(pixel_formats[j]);
SDL_assert(fmt1);
SDL_assert(fmt1 != NULL);
cvt2 = SDL_ConvertSurface(cvt1, fmt2);
SDL_assert(cvt2);
SDL_assert(cvt2 != NULL);
if (fmt1->BytesPerPixel == face->format->BytesPerPixel &&
fmt2->BytesPerPixel == face->format->BytesPerPixel &&
(fmt1->Amask != 0) == (face->format->Amask != 0) &&
(fmt2->Amask != 0) == (face->format->Amask != 0)) {
final = SDL_ConvertSurface(cvt2, face->format);
SDL_assert(final);
SDL_assert(final != NULL);
/* Compare surface. */
ret = SDLTest_CompareSurfaces(face, final, 0);