SDL_ASSERT_LEVEL(3)

πŸ’– SDL_ASSERT_LEVEL πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we talk about SDL_ASSERT_LEVEL β€” the macro that decides just how loudly your asserts are gonna yell at you 🫢


✨ NAME ✨

SDL_ASSERT_LEVEL β€” the level of assertion aggressiveness. yes really, that's the whole vibe check: how aggressive are your assertions gonna be πŸ”₯


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_assert.h>

#define SDL_ASSERT_LEVEL SomeNumberBasedOnVariousFactors

like… it's literally SomeNumberBasedOnVariousFactors. iconic, no notes πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: this value changes depending on compiler options and other preprocessor defines. it's not you picking it, it's the build picking it for you, bestie.

it is currently one of the following values β€” but heads up, future SDL releases might add more, so don't go treating this list like it's frozen forever πŸ‘‘

  • 0 β€” all SDL assertion macros are disabled. total silence. nothing checks, nothing complains. the chillest possible setting 😌
  • 1 β€” Release settings: SDL_assert is disabled, SDL_assert_release is enabled. so the release one still shows up to the party, but the regular one ghosted πŸ™ˆ
  • 2 β€” Debug settings: SDL_assert and SDL_assert_release are both enabled. now we're talking, both of them are awake ✨
  • 3 β€” Paranoid settings: all SDL assertion macros are enabled, including SDL_assert_paranoid. this is the maximum-paranoia, main-character, checking-everything level πŸ’€πŸ‘‘

⭐ AVAILABILITY ⭐

this macro has been available since SDL 3.2.0. so if you're on anything older… yeah, no SDL_ASSERT_LEVEL for you, sorry babe 😭


and that's the whole page, bestie!! this was Simple Directmedia Layer, SDL 3.4.18, and the page itself is dated SDL_ASSERT_LEVEL(3) β€” mwah, go forth and assert responsibly πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from