assert: Added SDL_HINT_ASSERT.

Same environment variable, but now accessible as a formal SDL hint.

Reference PR #10171.
This commit is contained in:
Ryan C. Gordon 2024-08-18 20:53:07 -04:00
parent 59ac561062
commit 9c5bd98a0f
No known key found for this signature in database
GPG key ID: FA148B892AB48044
3 changed files with 31 additions and 21 deletions

View file

@ -4120,6 +4120,29 @@ extern "C" {
*/
#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
/**
* A variable controlling response to SDL_assert failures.
*
* The variable can be set to the following case-sensitive values:
*
* - "abort": Program terminates immediately.
* - "break": Program triggers a debugger breakpoint.
* - "retry": Program reruns the SDL_assert's test again.
* - "ignore": Program continues on, ignoring this assertion failure this time.
* - "always_ignore": Program continues on, ignoring this assertion failure for the rest of the run.
*
* Note that SDL_SetAssertionHandler offers a programmatic means to deal with
* assertion failures through a callback, and this hint is largely intended to
* be used via environment variables by end users and automated tools.
*
* This hint should be set before an assertion failure is triggered and can
* be changed at any time.
*
* \since This hint is available since SDL 3.0.0.
*/
#define SDL_HINT_ASSERT "SDL_ASSERT"
/**
* An enumeration of hint priorities.
*