SDL_image: SDL3 supports blitting with palette alpha now

From f201ed2bf566d3142cbe6a9af7a50aa93b469957 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 28 Dec 2023 09:42:27 -0800
Subject: [PATCH] SDL3 supports blitting with palette alpha now

---
 src/IMG_stb.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/IMG_stb.c b/src/IMG_stb.c
index 464efce1..128325bc 100644
--- a/src/IMG_stb.c
+++ b/src/IMG_stb.c
@@ -173,13 +173,7 @@ SDL_Surface *IMG_LoadSTB_RW(SDL_RWops *src)
                 }
             }
             if (has_alpha) {
-#if 1 /* SDL doesn't support blitting with the palette alpha, so expand the palette */
-                SDL_Surface *converted = SDL_ConvertSurfaceFormat(surface, SDL_PIXELFORMAT_RGBA32);
-                SDL_DestroySurface(surface);
-                surface = converted;
-#else
                 SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND);
-#endif
             } else if (has_colorkey) {
                 SDL_SetSurfaceColorKey(surface, SDL_TRUE, colorkey_index);
             }
@@ -189,9 +183,7 @@ SDL_Surface *IMG_LoadSTB_RW(SDL_RWops *src)
              * https://github.com/nothings/stb/issues/58
              * -flibit
              */
-            if (surface) {
-                surface->flags &= ~SDL_PREALLOC;
-            }
+            surface->flags &= ~SDL_PREALLOC;
         }
 
     } else if (format == STBI_grey || format == STBI_rgb || format == STBI_rgb_alpha) {