SDL_image: Fixed wrapping IMG_LoadPNG_RW() with PNG_USES_IMAGEIO

From 9cdab5f6755c4f8cdb55afc90d61a36a21e0d004 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 10 May 2022 09:59:46 -0700
Subject: [PATCH] Fixed wrapping IMG_LoadPNG_RW() with PNG_USES_IMAGEIO

---
 IMG_ImageIO.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/IMG_ImageIO.m b/IMG_ImageIO.m
index 0d790f1..230c6ef 100644
--- a/IMG_ImageIO.m
+++ b/IMG_ImageIO.m
@@ -768,11 +768,15 @@ int IMG_isTIF(SDL_RWops *src)
 
 #endif /* JPG_USES_IMAGEIO */
 
+#ifdef PNG_USES_IMAGEIO
+
 SDL_Surface* IMG_LoadPNG_RW (SDL_RWops *src)
 {
     return LoadImageFromRWops (src, kUTTypePNG);
 }
 
+#endif /* PNG_USES_IMAGEIO */
+
 SDL_Surface* IMG_LoadTGA_RW (SDL_RWops *src)
 {
     return LoadImageFromRWops(src, CFSTR("com.truevision.tga-image"));