SDL_image: update after SDL_Swap rename in SDL3

From bda40af80acfb220c5072f4401c7470da83ffbbd Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 12 Jun 2024 02:19:39 +0200
Subject: [PATCH] update after SDL_Swap rename in SDL3

---
 src/IMG_lbm.c | 18 +++++++++---------
 src/IMG_pcx.c | 10 +++++-----
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/IMG_lbm.c b/src/IMG_lbm.c
index 496c27b3..9bfadec6 100644
--- a/src/IMG_lbm.c
+++ b/src/IMG_lbm.c
@@ -161,7 +161,7 @@ SDL_Surface *IMG_LoadLBM_IO(SDL_IOStream *src )
 
         bytesloaded = 0;
 
-        size = SDL_SwapBE32( size );
+        size = SDL_Swap32BE( size );
 
         if ( !SDL_memcmp( id, "BMHD", 4 ) ) /* Bitmap header */
         {
@@ -173,13 +173,13 @@ SDL_Surface *IMG_LoadLBM_IO(SDL_IOStream *src )
 
             bytesloaded = sizeof( BMHD );
 
-            bmhd.w      = SDL_SwapBE16( bmhd.w );
-            bmhd.h      = SDL_SwapBE16( bmhd.h );
-            bmhd.x      = SDL_SwapBE16( bmhd.x );
-            bmhd.y      = SDL_SwapBE16( bmhd.y );
-            bmhd.tcolor = SDL_SwapBE16( bmhd.tcolor );
-            bmhd.Lpage  = SDL_SwapBE16( bmhd.Lpage );
-            bmhd.Hpage  = SDL_SwapBE16( bmhd.Hpage );
+            bmhd.w      = SDL_Swap16BE( bmhd.w );
+            bmhd.h      = SDL_Swap16BE( bmhd.h );
+            bmhd.x      = SDL_Swap16BE( bmhd.x );
+            bmhd.y      = SDL_Swap16BE( bmhd.y );
+            bmhd.tcolor = SDL_Swap16BE( bmhd.tcolor );
+            bmhd.Lpage  = SDL_Swap16BE( bmhd.Lpage );
+            bmhd.Hpage  = SDL_Swap16BE( bmhd.Hpage );
         }
 
         if ( !SDL_memcmp( id, "CMAP", 4 ) ) /* palette ( Color Map ) */
@@ -209,7 +209,7 @@ SDL_Surface *IMG_LoadLBM_IO(SDL_IOStream *src )
             }
 
             bytesloaded = size;
-            viewmodes = SDL_SwapBE32( viewmodes );
+            viewmodes = SDL_Swap32BE( viewmodes );
             if ( viewmodes & 0x0800 )
                 flagHAM = 1;
             if ( viewmodes & 0x0080 )
diff --git a/src/IMG_pcx.c b/src/IMG_pcx.c
index bc6e10cf..dd17ad67 100644
--- a/src/IMG_pcx.c
+++ b/src/IMG_pcx.c
@@ -110,11 +110,11 @@ SDL_Surface *IMG_LoadPCX_IO(SDL_IOStream *src)
         error = "file truncated";
         goto done;
     }
-    pcxh.Xmin = SDL_SwapLE16(pcxh.Xmin);
-    pcxh.Ymin = SDL_SwapLE16(pcxh.Ymin);
-    pcxh.Xmax = SDL_SwapLE16(pcxh.Xmax);
-    pcxh.Ymax = SDL_SwapLE16(pcxh.Ymax);
-    pcxh.BytesPerLine = SDL_SwapLE16(pcxh.BytesPerLine);
+    pcxh.Xmin = SDL_Swap16LE(pcxh.Xmin);
+    pcxh.Ymin = SDL_Swap16LE(pcxh.Ymin);
+    pcxh.Xmax = SDL_Swap16LE(pcxh.Xmax);
+    pcxh.Ymax = SDL_Swap16LE(pcxh.Ymax);
+    pcxh.BytesPerLine = SDL_Swap16LE(pcxh.BytesPerLine);
 
 #if 0
     printf("Manufacturer = %d\n", pcxh.Manufacturer);