mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 15:38:29 +00:00
Fixed a few remaining functions to directly return their values instead of an error code.
This commit is contained in:
@@ -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.
|
||||
|
@@ -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.
|
||||
|
@@ -426,16 +426,14 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetAndroidInternalStoragePath(void);
|
||||
*
|
||||
* If external storage is currently unavailable, this will return 0.
|
||||
*
|
||||
* \param state filled with the current state of external storage. 0 if
|
||||
* \returns the current state of external storage, or 0 if
|
||||
* external storage is currently unavailable.
|
||||
* \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_GetAndroidExternalStoragePath
|
||||
*/
|
||||
extern SDL_DECLSPEC int SDLCALL SDL_GetAndroidExternalStorageState(Uint32 *state);
|
||||
extern SDL_DECLSPEC Uint32 SDLCALL SDL_GetAndroidExternalStorageState(void);
|
||||
|
||||
/**
|
||||
* Get the path used for external storage for this Android application.
|
||||
|
Reference in New Issue
Block a user