Procházet zdrojové kódy

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.
L zard před 1 rokem
rodič
revize
ade829d7ca
1 změnil soubory, kde provedl 3 přidání a 2 odebrání
  1. 3 2
      include/build_config/SDL_build_config.h.cmake

+ 3 - 2
include/build_config/SDL_build_config.h.cmake

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