use std::sync::OnceLock;
static DEBUG_ENABLED: OnceLock<bool> = OnceLock::new();
pub fn is_debug_enabled() -> bool {
*DEBUG_ENABLED.get_or_init(|| {
std::env::var("PRESENCEFORGE_DEBUG")
.map(|val| val == "1" || val.eq_ignore_ascii_case("true"))
.unwrap_or(false)
})
}
#[macro_export]
macro_rules! debug_println {
($($arg:tt)*) => {
if $crate::macros::is_debug_enabled() {
println!($($arg)*);
}
};
}