Update debugf usage

This commit is contained in:
gingerBill
2023-01-14 13:42:04 +00:00
parent 518f30e523
commit 9aa9429135
3 changed files with 10 additions and 6 deletions
+4
View File
@@ -27,13 +27,17 @@ gb_internal void thread_pool_wait(void) {
}
gb_global BlockingMutex debugf_mutex;
gb_internal void debugf(char const *fmt, ...) {
if (build_context.show_debug_messages) {
mutex_lock(&debugf_mutex);
gb_printf_err("[DEBUG] ");
va_list va;
va_start(va, fmt);
(void)gb_printf_err_va(fmt, va);
va_end(va);
mutex_unlock(&debugf_mutex);
}
}