sdl12-compat: several type / prototype fixes for SDL2 functions.

From 663c34b130383df2ba6674dc13657da9ca597cb7 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 4 Feb 2023 01:55:50 +0300
Subject: [PATCH] several type / prototype fixes for SDL2 functions.

---
 src/SDL12_compat.c | 4 ++++
 src/SDL20_syms.h   | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index b9aa2eabe..2af6547a4 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -1513,6 +1513,10 @@ unsigned _System LibMain(unsigned hmod, unsigned termination)
     #error Please define an init procedure for your platform.
 #endif
 
+/* Forward declarations */
+DECLSPEC12 void SDLCALL SDL_CloseAudio(void);
+DECLSPEC12 void SDLCALL SDL_PumpEvents(void);
+
 #ifdef _WIN32
 /* SDL_main functions:
  * SDL2 doesn't define SDL_MAIN_NEEDED for _WIN32,
diff --git a/src/SDL20_syms.h b/src/SDL20_syms.h
index a2dd92448..23a97a9ce 100644
--- a/src/SDL20_syms.h
+++ b/src/SDL20_syms.h
@@ -46,7 +46,7 @@ SDL20_SYM_VARARGS(void,Log,(const char *fmt, ...))
 SDL20_SYM(int,Init,(Uint32 a),(a),return)
 SDL20_SYM(int,InitSubSystem,(Uint32 a),(a),return)
 SDL20_SYM(Uint32,WasInit,(Uint32 a),(a),return)
-SDL20_SYM(char*,GetError,(void),(),return)
+SDL20_SYM(const char*,GetError,(void),(),return)
 SDL20_SYM_VARARGS(int,SetError,(const char *fmt, ...))
 
 SDL20_SYM(const char *,GetHint,(const char *a),(a),return)
@@ -114,7 +114,7 @@ SDL20_SYM(SDL_Surface *,ConvertSurface,(SDL_Surface *a, const SDL_PixelFormat *b
 SDL20_SYM(int,LockSurface,(SDL_Surface *a),(a),return)
 SDL20_SYM(void,UnlockSurface,(SDL_Surface *a),(a),)
 SDL20_SYM(int,UpperBlit,(SDL_Surface *a,const SDL_Rect *b,SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
-SDL20_SYM(int,LowerBlit,(SDL_Surface *a,const SDL_Rect *b,SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
+SDL20_SYM(int,LowerBlit,(SDL_Surface *a,SDL_Rect *b,SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
 SDL20_SYM(int,SoftStretch,(SDL_Surface *a,const SDL_Rect *b,SDL_Surface *c,const SDL_Rect *d),(a,b,c,d),return)
 SDL20_SYM(int,SetColorKey,(SDL_Surface *a, int b, Uint32 c),(a,b,c),return)
 SDL20_SYM(int,GetColorKey,(SDL_Surface *a, Uint32 *b),(a,b),return)
@@ -195,7 +195,7 @@ SDL20_SYM_PASSTHROUGH(int,CondWait,(SDL_cond *a, SDL_mutex *b),(a,b),return)
 SDL20_SYM_PASSTHROUGH(int,CondWaitTimeout,(SDL_cond *a, SDL_mutex *b, Uint32 c),(a,b,c),return)
 
 SDL20_SYM(int,AtomicGet,(SDL_atomic_t *a),(a),return)
-SDL20_SYM(void,AtomicSet,(SDL_atomic_t *a, int b),(a,b),)
+SDL20_SYM(int,AtomicSet,(SDL_atomic_t *a, int b),(a,b),return)
 SDL20_SYM(int,AtomicAdd,(SDL_atomic_t *a, int b),(a,b),return)
 
 SDL20_SYM(SDL_AudioSpec *,LoadWAV_RW,(SDL_RWops *a, int b, SDL_AudioSpec *c, Uint8 **d, Uint32 *e),(a,b,c,d,e),return)
@@ -262,7 +262,7 @@ SDL20_SYM(void,LockJoysticks,(void),(),)
 SDL20_SYM(void,UnlockJoysticks,(void),(),)
 
 SDL20_SYM(SDL_RWops *,RWFromFile,(const char *a, const char *b),(a,b),return)
-SDL20_SYM(SDL_RWops *,RWFromFP,(void *a, int b),(a,b),return) /* FILE* */
+SDL20_SYM(SDL_RWops *,RWFromFP,(void *a, SDL_bool b),(a,b),return) /* FILE* */
 SDL20_SYM(SDL_RWops *,RWFromMem,(void *a, int b),(a,b),return)
 SDL20_SYM(SDL_RWops *,RWFromConstMem,(const void *a, int b),(a,b),return)
 SDL20_SYM(SDL_RWops *,AllocRW,(void),(),return)