sdl2-compat: hints: SDL_AddHintCallback returns an int in SDL3, no longer void.

From 2725dd453eb51bd6719ce60cbef66051ced521db Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Mon, 9 Jan 2023 22:47:04 -0500
Subject: [PATCH] hints: SDL_AddHintCallback returns an int in SDL3, no longer
 void.

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

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 8b16f5a..4f1fd3d 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -380,11 +380,12 @@ SDL_GetHintBoolean(const char *name, SDL_bool default_value)
     return SDL3_GetHintBoolean(SDL2_to_SDL3_hint(name), default_value);
 }
 
-/* FIXME: callbacks may need to tweaking ... */
+/* FIXME: callbacks may need tweaking ... */
 DECLSPEC void SDLCALL
 SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
 {
-    SDL3_AddHintCallback(SDL2_to_SDL3_hint(name), callback, userdata);
+    /* this returns an int of 0 or -1 in SDL3, but SDL2 it was void (even if it failed). */
+    (void) SDL3_AddHintCallback(SDL2_to_SDL3_hint(name), callback, userdata);
 }
 
 DECLSPEC void SDLCALL
diff --git a/src/sdl3_syms.h b/src/sdl3_syms.h
index aa5e9e7..5e18bb8 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -197,7 +197,7 @@ SDL3_SYM_PASSTHROUGH(int,HapticRumbleStop,(SDL_Haptic *a),(a),return)
 SDL3_SYM(SDL_bool,SetHintWithPriority,(const char *a, const char *b, SDL_HintPriority c),(a,b,c),return)
 SDL3_SYM(SDL_bool,SetHint,(const char *a, const char *b),(a,b),return)
 SDL3_SYM(const char*,GetHint,(const char *a),(a),return)
-SDL3_SYM(void,AddHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),)
+SDL3_SYM(int,AddHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),)
 SDL3_SYM(void,DelHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),)
 SDL3_SYM_PASSTHROUGH(void,ClearHints,(void),(),)
 SDL3_SYM_RENAMED(const char*,JoystickName,GetJoystickName,(SDL_Joystick *a),(a),return)