From 22515dfa99a428ab0f16d1dae19aa1dde1cb620e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Wed, 19 May 2021 19:17:06 -0400
Subject: [PATCH] Fix some return types for SDL functions

---
 src/conio/sdlfuncs.c |  2 +-
 src/conio/sdlfuncs.h | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/conio/sdlfuncs.c b/src/conio/sdlfuncs.c
index 09c3db2d4d..d5c2f09129 100644
--- a/src/conio/sdlfuncs.c
+++ b/src/conio/sdlfuncs.c
@@ -218,7 +218,7 @@ int load_sdl_funcs(struct sdlfuncs *sdlf)
 
 int init_sdl_video(void)
 {
-	char	*drivername;
+	const char	*drivername;
 
 	if(sdl_video_initialized)
 		return(0);
diff --git a/src/conio/sdlfuncs.h b/src/conio/sdlfuncs.h
index b0b35f2e78..7dd75bdf9b 100644
--- a/src/conio/sdlfuncs.h
+++ b/src/conio/sdlfuncs.h
@@ -15,7 +15,7 @@ struct sdlfuncs {
 	void	(HACK_HACK_HACK *Quit)	(void);
 	int	(HACK_HACK_HACK *PeepEvents)	(SDL_Event *events, int numevents,
 					SDL_eventaction action, Uint32 minType, Uint32 maxType);
-	char	*(HACK_HACK_HACK *GetCurrentVideoDriver)	(void);
+	const char *(HACK_HACK_HACK *GetCurrentVideoDriver)	(void);
 	Uint8	(HACK_HACK_HACK *EventState)	(Uint32 type, int state);
 	SDL_Surface *(HACK_HACK_HACK *CreateRGBSurfaceFrom)(void *pixels, int width, int height, int depth, int pitch,
 							Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
@@ -41,14 +41,14 @@ struct sdlfuncs {
 	SDL_Keymod (HACK_HACK_HACK *GetModState)	(void);
 	void (HACK_HACK_HACK *SetWindowSize)	(SDL_Window *window, int w, int h);
 	void (HACK_HACK_HACK *DestroyTexture)	(SDL_Texture *texture);
-	void (HACK_HACK_HACK *SetWindowFullscreen)	(SDL_Window *window, Uint32 flags);
-	void (HACK_HACK_HACK *LockTexture)	(SDL_Texture *texture, const SDL_Rect *rect, void **pixels, int *pitch);
+	int (HACK_HACK_HACK *SetWindowFullscreen)	(SDL_Window *window, Uint32 flags);
+	int (HACK_HACK_HACK *LockTexture)	(SDL_Texture *texture, const SDL_Rect *rect, void **pixels, int *pitch);
 	void (HACK_HACK_HACK *UnlockTexture)	(SDL_Texture *texture);
-	void (HACK_HACK_HACK *QueryTexture)	(SDL_Texture *texture, Uint32 *format, int *access, int *w, int *h);
+	int (HACK_HACK_HACK *QueryTexture)	(SDL_Texture *texture, Uint32 *format, int *access, int *w, int *h);
 	void (HACK_HACK_HACK *GetWindowPosition)	(SDL_Window *window, int *x, int *y);
 	void (HACK_HACK_HACK *SetWindowPosition)	(SDL_Window *window, int x, int y);
 	void (HACK_HACK_HACK *SetWindowMinimumSize)	(SDL_Window *window, int w, int y);
-	void (HACK_HACK_HACK *SetClipboardText)	(const char *);
+	int (HACK_HACK_HACK *SetClipboardText)	(const char *);
 	char *(HACK_HACK_HACK *GetClipboardText)	(void);
 	SDL_Cursor *(HACK_HACK_HACK *CreateSystemCursor)	(SDL_SystemCursor id);
 	SDL_Cursor *(HACK_HACK_HACK *GetDefaultCursor)	(void);
-- 
GitLab