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:
Sam Lantinga
2024-05-07 14:03:25 -07:00
parent 991d28ae37
commit afe7c7a644
4 changed files with 7 additions and 4 deletions

View File

@@ -107,7 +107,7 @@ SDL_DYNAPI_PROC(void,SDL_CleanupTLS,(void),(),)
SDL_DYNAPI_PROC(int,SDL_ClearAudioStream,(SDL_AudioStream *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_ClearClipboardData,(void),(),return)
SDL_DYNAPI_PROC(void,SDL_ClearComposition,(void),(),)
SDL_DYNAPI_PROC(void,SDL_ClearError,(void),(),)
SDL_DYNAPI_PROC(int,SDL_ClearError,(void),(),return)
SDL_DYNAPI_PROC(int,SDL_ClearProperty,(SDL_PropertiesID a, const char *b),(a,b),return)
SDL_DYNAPI_PROC(void,SDL_CloseAudioDevice,(SDL_AudioDeviceID a),(a),)
SDL_DYNAPI_PROC(void,SDL_CloseCamera,(SDL_Camera *a),(a),)