SDL_UnlockTexture: change from 'int' to 'void'

main
Sylvain 2023-02-09 20:16:41 +01:00 committed by Sylvain Becker
parent cee245b6a9
commit dc74a67a57
3 changed files with 5 additions and 9 deletions

View File

@ -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.

View File

@ -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)

View File

@ -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)