build_config: fix `SDL_DEFAULT_ASSERT_LEVEL`

Currently, `SDL_DEFAULT_ASSERT_LEVEL` is commented out by CMake when its value is 0, setting the assertions level to the default value instead of disabling them.
This change:
- defines `SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED` when its value is non-zero.
- defines `SDL_DEFAULT_ASSERT_LEVEL`, regardless of its value, when `SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED` is defined.
This commit is contained in:
L zard 2024-11-02 13:18:43 +01:00 committed by Sam Lantinga
parent e73d98ad72
commit ade829d7ca
1 changed files with 3 additions and 2 deletions

View File

@ -228,8 +228,9 @@
#cmakedefine USE_POSIX_SPAWN @USE_POSIX_SPAWN@ #cmakedefine USE_POSIX_SPAWN @USE_POSIX_SPAWN@
/* SDL internal assertion support */ /* SDL internal assertion support */
#if @SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED@ #cmakedefine SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED 1
#cmakedefine SDL_DEFAULT_ASSERT_LEVEL @SDL_DEFAULT_ASSERT_LEVEL@ #ifdef SDL_DEFAULT_ASSERT_LEVEL_CONFIGURED
#define SDL_DEFAULT_ASSERT_LEVEL @SDL_DEFAULT_ASSERT_LEVEL@
#endif #endif
/* Allow disabling of major subsystems */ /* Allow disabling of major subsystems */