SDL: SDL_UnlockTexture: change from 'int' to 'void'

From dc74a67a57e4b5ef767201f7ff166af7bf871f21 Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Thu, 9 Feb 2023 20:16:41 +0100
Subject: [PATCH] SDL_UnlockTexture: change from 'int' to 'void'

---
 include/SDL3/SDL_render.h     | 5 +----
 src/dynapi/SDL_dynapi_procs.h | 2 +-
 src/render/SDL_render.c       | 7 +++----
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/include/SDL3/SDL_render.h b/include/SDL3/SDL_render.h
index bcefdec1688d..775ab4c5f7d5 100644
--- a/include/SDL3/SDL_render.h
+++ b/include/SDL3/SDL_render.h
@@ -783,14 +783,11 @@ extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture,
  *
  * \param texture a texture locked by SDL_LockTexture()
  *
- * \returns 0 on success or a negative error code on failure; call
- *          SDL_GetError() for more information.
- *
  * \since This function is available since SDL 3.0.0.
  *
  * \sa SDL_LockTexture
  */
-extern DECLSPEC int SDLCALL SDL_UnlockTexture(SDL_Texture *texture);
+extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture *texture);
 
 /**
  * Set a texture as the current rendering target.
diff --git a/src/dynapi/SDL_dynapi_procs.h b/src/dynapi/SDL_dynapi_procs.h
index 3b6b019c5ea8..70542e4b23c1 100644
--- a/src/dynapi/SDL_dynapi_procs.h
+++ b/src/dynapi/SDL_dynapi_procs.h
@@ -726,7 +726,7 @@ SDL_DYNAPI_PROC(void,SDL_UnlockAudioDevice,(SDL_AudioDeviceID a),(a),)
 SDL_DYNAPI_PROC(void,SDL_UnlockJoysticks,(void),(),)
 SDL_DYNAPI_PROC(int,SDL_UnlockMutex,(SDL_mutex *a),(a),return)
 SDL_DYNAPI_PROC(void,SDL_UnlockSurface,(SDL_Surface *a),(a),)
-SDL_DYNAPI_PROC(int,SDL_UnlockTexture,(SDL_Texture *a),(a),return)
+SDL_DYNAPI_PROC(void,SDL_UnlockTexture,(SDL_Texture *a),(a),return)
 SDL_DYNAPI_PROC(void,SDL_UpdateGamepads,(void),(),)
 SDL_DYNAPI_PROC(void,SDL_UpdateJoysticks,(void),(),)
 SDL_DYNAPI_PROC(int,SDL_UpdateNVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f),(a,b,c,d,e,f),return)
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 9048da9acf90..cb7dbdc3f235 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -2013,12 +2013,12 @@ static void SDL_UnlockTextureNative(SDL_Texture *texture)
     SDL_UnlockTexture(native);
 }
 
-int SDL_UnlockTexture(SDL_Texture *texture)
+void SDL_UnlockTexture(SDL_Texture *texture)
 {
-    CHECK_TEXTURE_MAGIC(texture, -1);
+    CHECK_TEXTURE_MAGIC(texture,);
 
     if (texture->access != SDL_TEXTUREACCESS_STREAMING) {
-        return 0;
+        return;
     }
 #if SDL_HAVE_YUV
     if (texture->yuv) {
@@ -2034,7 +2034,6 @@ int SDL_UnlockTexture(SDL_Texture *texture)
 
     SDL_DestroySurface(texture->locked_surface);
     texture->locked_surface = NULL;
-    return 0;
 }
 
 static int SDL_SetRenderTargetInternal(SDL_Renderer *renderer, SDL_Texture *texture)