From b8e9dd38a115ee6edc120fd22b98ab09453a4d3b Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 16 Oct 2023 09:29:13 -0700 Subject: [PATCH] Fixed building when SDL2IMAGE_PNG is disabled Fixes https://github.com/libsdl-org/SDL_image/issues/297 --- test/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/main.c b/test/main.c index 5ca4cccc..1f38e5d4 100644 --- a/test/main.c +++ b/test/main.c @@ -303,7 +303,11 @@ static const Format formats[] = #else SDL_FALSE, #endif - SDL_IMAGE_SAVE_PNG, +#ifdef SDL_IMAGE_SAVE_PNG + SDL_IMAGE_SAVE_PNG ? SDL_TRUE : SDL_FALSE, +#else + SDL_FALSE, +#endif IMG_isPNG, IMG_LoadPNG_RW, },