Changed SDL_ClearError() to always return 0.
This will provide a quick and easy way of clearing the error when a function succeeds, if we want to do that in a more widespread way. For now we guarantee that SDL_Init() will never have an error set when it returns successfully. Fixes https://github.com/libsdl-org/SDL/issues/8421
This commit is contained in:
@@ -105,12 +105,14 @@ extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
||||
/**
|
||||
* Clear any previous error message for this thread.
|
||||
*
|
||||
* \returns 0
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_GetError
|
||||
* \sa SDL_SetError
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ClearError(void);
|
||||
extern DECLSPEC int SDLCALL SDL_ClearError(void);
|
||||
|
||||
/**
|
||||
* \name Internal error functions
|
||||
|
||||
Reference in New Issue
Block a user