Fixed a few remaining functions to directly return their values instead of an error code.

This commit is contained in:
Sam Lantinga 2024-07-16 21:15:56 -07:00
parent 1e828eec57
commit 3d2e5a0b66
15 changed files with 91 additions and 123 deletions
include/SDL3

View file

@ -1006,15 +1006,13 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture *texture, SD
* Get the blend mode used for texture copy operations.
*
* \param texture the texture to query.
* \param blendMode a pointer filled in with the current SDL_BlendMode.
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
* \returns the current SDL_BlendMode.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_SetTextureBlendMode
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode *blendMode);
extern SDL_DECLSPEC SDL_BlendMode SDLCALL SDL_GetTextureBlendMode(SDL_Texture *texture);
/**
* Set the scale mode used for texture scale operations.
@ -1038,15 +1036,13 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture *texture, SD
* Get the scale mode used for texture scale operations.
*
* \param texture the texture to query.
* \param scaleMode a pointer filled in with the current scale mode.
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
* \returns the current scale mode.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_SetTextureScaleMode
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode *scaleMode);
extern SDL_DECLSPEC SDL_ScaleMode SDLCALL SDL_GetTextureScaleMode(SDL_Texture *texture);
/**
* Update the given texture rectangle with new pixel data.
@ -1641,15 +1637,13 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetRenderColorScale(SDL_Renderer *renderer,
* Get the color scale used for render operations.
*
* \param renderer the rendering context.
* \param scale a pointer filled in with the current color scale value.
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
* \returns the current color scale value.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_SetRenderColorScale
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetRenderColorScale(SDL_Renderer *renderer, float *scale);
extern SDL_DECLSPEC float SDLCALL SDL_GetRenderColorScale(SDL_Renderer *renderer);
/**
* Set the blend mode used for drawing operations (Fill and Line).
@ -1671,15 +1665,13 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer *rendere
* Get the blend mode used for drawing operations.
*
* \param renderer the rendering context.
* \param blendMode a pointer filled in with the current SDL_BlendMode.
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
* \returns the current SDL_BlendMode.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_SetRenderDrawBlendMode
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode *blendMode);
extern SDL_DECLSPEC SDL_BlendMode SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer *renderer);
/**
* Clear the current rendering target with the drawing color.