SDL: Simplified SDL_CreateRGBSurface* functions

From a463aca0d1353be3fa45e09429b378cd28eb5a59 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 1 Dec 2022 08:53:14 -0800
Subject: [PATCH] Simplified SDL_CreateRGBSurface* functions

---
 docs/README-migration.md | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/docs/README-migration.md b/docs/README-migration.md
index 6e10f487070e..c97a445c7d3c 100644
--- a/docs/README-migration.md
+++ b/docs/README-migration.md
@@ -169,26 +169,26 @@ SDL_CreateRGBSurfaceFrom() and SDL_CreateRGBSurfaceWithFormatFrom() have been co
 
 You can implement the old functions in your own code easily:
 ```c
-SDL_Surface *SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, Uint32 format)
+SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
 {
-    return SDL_CreateSurface(width, height, format);
+    return SDL_CreateSurface(width, height,
+            SDL_MasksToPixelFormatEnum(depth, Rmask, Gmask, Bmask, Amask));
 }
 
-SDL_Surface * SDL_CreateRGBSurfaceWithFormatFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 format)
+SDL_Surface *SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, Uint32 format)
 {
-    return SDL_CreateSurfaceFrom(pixels, width, height, pitch, format);
+    return SDL_CreateSurface(width, height, format);
 }
 
-SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
+SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
 {
-    return SDL_CreateRGBSurfaceWithFormat(flags, width, height, depth,
+    return SDL_CreateSurfaceFrom(pixels, width, height, pitch,
             SDL_MasksToPixelFormatEnum(depth, Rmask, Gmask, Bmask, Amask));
 }
 
-SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
+SDL_Surface *SDL_CreateRGBSurfaceWithFormatFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 format)
 {
-    return SDL_CreateRGBSurfaceWithFormatFrom(pixels, width, height, depth, pitch,
-            SDL_MasksToPixelFormatEnum(depth, Rmask, Gmask, Bmask, Amask));
+    return SDL_CreateSurfaceFrom(pixels, width, height, pitch, format);
 }