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

View File

@@ -511,16 +511,14 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SurfaceHasColorKey(SDL_Surface *surface
* If the surface doesn't have color key enabled this function returns -1.
*
* \param surface the SDL_Surface structure to query.
* \param key a pointer filled in with the transparent pixel.
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
* \returns the transparent pixel.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_SetSurfaceColorKey
* \sa SDL_SurfaceHasColorKey
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetSurfaceColorKey(SDL_Surface *surface, Uint32 *key);
extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetSurfaceColorKey(SDL_Surface *surface);
/**
* Set an additional color value multiplied into blit operations.
@@ -620,15 +618,13 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface *surface, SD
* Get the blend mode used for blit operations.
*
* \param surface the SDL_Surface structure 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_SetSurfaceBlendMode
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode);
extern SDL_DECLSPEC SDL_BlendMode SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface *surface);
/**
* Set the clipping rectangle for a surface.