Add error returns to void functions that can fail/set errors.

This takes care of the last set of void functions that could
potentially be shifted to instead return an int indicating success and
setting an error in case of an error.
This commit is contained in:
Linus Probert
2023-02-08 20:43:52 +01:00
committed by Sam Lantinga
parent b305d9e3c0
commit 3bd737d44c
13 changed files with 53 additions and 27 deletions

View File

@@ -115,12 +115,14 @@ typedef struct SDL_version
* This function may be called safely at any time, even before SDL_Init().
*
* \param ver the SDL_version structure that contains the version information
* \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_GetRevision
*/
extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
extern DECLSPEC int SDLCALL SDL_GetVersion(SDL_version * ver);
/**
* Get the code revision of SDL that is linked against your program.