Added SDL_GetAssertionHandler() and SDL_GetDefaultAssertionHandler().

This commit is contained in:
Ryan C. Gordon
2014-02-04 11:38:40 -05:00
parent e6dce68f8e
commit c2b5da9733
4 changed files with 46 additions and 0 deletions

View File

@@ -366,4 +366,17 @@ void SDL_ResetAssertionReport(void)
triggered_assertions = NULL;
}
SDL_AssertionHandler SDL_GetDefaultAssertionHandler(void)
{
return SDL_PromptAssertion;
}
SDL_AssertionHandler SDL_GetAssertionHandler(void **userdata)
{
if (userdata != NULL) {
*userdata = assertion_userdata;
}
return assertion_handler;
}
/* vi: set ts=4 sw=4 expandtab: */

View File

@@ -572,3 +572,5 @@
#define SDL_GameControllerAddMappingsFromRW SDL_GameControllerAddMappingsFromRW_REAL
#define SDL_GL_ResetAttributes SDL_GL_ResetAttributes_REAL
#define SDL_HasAVX SDL_HasAVX_REAL
#define SDL_GetDefaultAssertionHandler SDL_GetDefaultAssertionHandler_REAL
#define SDL_GetAssertionHandler SDL_GetAssertionHandler_REAL

View File

@@ -601,3 +601,5 @@ SDL_DYNAPI_PROC(int,SDL_vsscanf,(const char *a, const char *b, va_list c),(a,b,c
SDL_DYNAPI_PROC(int,SDL_GameControllerAddMappingsFromRW,(SDL_RWops *a, int b),(a,b),return)
SDL_DYNAPI_PROC(void,SDL_GL_ResetAttributes,(void),(),)
SDL_DYNAPI_PROC(SDL_bool,SDL_HasAVX,(void),(),return)
SDL_DYNAPI_PROC(SDL_AssertionHandler,SDL_GetDefaultAssertionHandler,(void),(),return)
SDL_DYNAPI_PROC(SDL_AssertionHandler,SDL_GetAssertionHandler,(void **a),(a),return)