sdl2-compat: SDL3 constified SDL_BlitSurfaceUnchecked and SDL_BlitSurfaceUncheckedScaled

From 5cc835b8df92e486c1571344c25f53c70ed16665 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 3 Jul 2023 11:01:10 +0300
Subject: [PATCH] SDL3 constified SDL_BlitSurfaceUnchecked and
 SDL_BlitSurfaceUncheckedScaled

---
 src/sdl2_compat.c | 12 ++++++++++++
 src/sdl3_syms.h   |  4 ++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index c213999..2201c3e 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -2275,6 +2275,18 @@ SDL_CreateRGBSurfaceWithFormatFrom(void *pixels, int width, int height, int dept
     return SDL3_CreateSurfaceFrom(pixels, width, height, pitch, format);
 }
 
+DECLSPEC int SDLCALL
+SDL_LowerBlit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
+{
+    return SDL3_BlitSurfaceUnchecked(src, srcrect, dst, dstrect);
+}
+
+DECLSPEC int SDLCALL
+SDL_LowerBlitScaled(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
+{
+    return SDL3_BlitSurfaceUncheckedScaled(src, srcrect, dst, dstrect);
+}
+
 /* SDL_GetTicks is 64-bit in SDL3. Clamp it for SDL2. */
 DECLSPEC Uint32 SDLCALL
 SDL_GetTicks(void)
diff --git a/src/sdl3_syms.h b/src/sdl3_syms.h
index 630c6bd..625b876 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -447,10 +447,10 @@ SDL3_SYM_PASSTHROUGH(int,ConvertPixels,(int a, int b, Uint32 c, const void *d, i
 SDL3_SYM_RENAMED(int,FillRect,FillSurfaceRect,(SDL_Surface *a, const SDL_Rect *b, Uint32 c),(a,b,c),return)
 SDL3_SYM_RENAMED(int,FillRects,FillSurfaceRects,(SDL_Surface *a, const SDL_Rect *b, int c, Uint32 d),(a,b,c,d),return)
 SDL3_SYM_RENAMED(int,UpperBlit,BlitSurface,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
-SDL3_SYM_RENAMED(int,LowerBlit,BlitSurfaceUnchecked,(SDL_Surface *a, SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
+SDL3_SYM(int,BlitSurfaceUnchecked,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, const SDL_Rect *d),(a,b,c,d),return)
 SDL3_SYM_PASSTHROUGH(int,SoftStretch,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, const SDL_Rect *d),(a,b,c,d),return)
 SDL3_SYM_RENAMED(int,UpperBlitScaled,BlitSurfaceScaled,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
-SDL3_SYM_RENAMED(int,LowerBlitScaled,BlitSurfaceUncheckedScaled,(SDL_Surface *a, SDL_Rect *b, SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
+SDL3_SYM(int,BlitSurfaceUncheckedScaled,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, const SDL_Rect *d),(a,b,c,d),return)
 SDL3_SYM(int,GetWindowWMInfo,(SDL_Window *a, SDL_SysWMinfo *b, Uint32 c),(a,b,c),return)
 SDL3_SYM_PASSTHROUGH(const char*,GetThreadName,(SDL_Thread *a),(a),return)
 SDL3_SYM_PASSTHROUGH(SDL_threadID,ThreadID,(void),(),return)