|
⇤ ← Revision 1 as of 2011-03-31 22:36:28
Size: 1763
Comment: create page - 3/29 e427bb6266a4
|
Size: 1904
Comment: minor change - add question to address w/ edits
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 39: | Line 39: |
| <<Color2(green,Should the callback params be described here? ie: where `SDL_assert_data` is <something> and `userdata` is <something>.)>> |
DRAFT |
SDL_SetAssertionHandler
Use this function to set an application-defined assertion handler.
Contents
Syntax
void SDL_SetAssertionHandler(SDL_AssertionHandler handler,
void* userdata)
Function Parameters
handler |
the callback function called when an assertion fails; see Remarks for details |
userdata |
a pointer passed to the callback as-is |
Return Value
Returns an SDL_assert_state value of how to handle the assertion failure.
green
Code Examples
You can add your code example here
Remarks
This function allows an app to show its own assertion UI and/or force the response to an assertion failure. If the app doesn't provide this, SDL will try to do the right thing, popping up a system-specific GUI dialog, and probably minimizing any fullscreen windows.
handler calls the following callback function:
SDL_assert_state (SDLCALL *SDL_AssertionHandler)( const SDL_assert_data*, void* userdata)
green
This callback may fire from any thread, but it runs wrapped in a mutex, so it will only fire from one thread at a time.
Setting the callback to NULL restores SDL's original internal handler.
This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
