From 0e46f64ebba9c870ee69207c581cdcd46d3fa399 Mon Sep 17 00:00:00 2001 From: Andre Weissflog Date: Thu, 2 Feb 2023 18:19:29 +0100 Subject: sokol_gl.h: implmenent new-style logging --- sokol_fetch.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sokol_fetch.h') diff --git a/sokol_fetch.h b/sokol_fetch.h index e6c49a6d..c72201e2 100644 --- a/sokol_fetch.h +++ b/sokol_fetch.h @@ -854,7 +854,7 @@ uint32_t log_level, // 0=panic, 1=error, 2=warn, 3=info uint32_t log_item_id, // SFETCH_LOGITEM_* const char* message_or_null, // a message string, may be nullptr in release mode - uint32_t line_nr, // line number in sokol_audio.h + uint32_t line_nr, // line number in sokol_fetch.h const char* filename_or_null, // source filename, may be nullptr in release mode void* user_data) { @@ -947,7 +947,7 @@ extern "C" { sfetch_log_item_t Log items are defined via X-Macros, and expanded to an - enum 'saudio_log_item', and in debug mode only, + enum 'sfetch_log_item', and in debug mode only, corresponding strings. Used as parameter in the logging callback. @@ -1370,6 +1370,7 @@ static __thread _sfetch_t* _sfetch; #else static _sfetch_t* _sfetch; #endif +#define _sfetch_def(val, def) (((val) == 0) ? (def) : (val)) // ██╗ ██████╗ ██████╗ ██████╗ ██╗███╗ ██╗ ██████╗ // ██║ ██╔═══██╗██╔════╝ ██╔════╝ ██║████╗ ██║██╔════╝ @@ -1419,8 +1420,6 @@ static void _sfetch_log(sfetch_log_item_t log_item, uint32_t log_level, uint32_t // ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ // // >>memory -#define _sfetch_def(val, def) (((val) == 0) ? (def) : (val)) - _SOKOL_PRIVATE void _sfetch_clear(void* ptr, size_t size) { SOKOL_ASSERT(ptr && (size > 0)); memset(ptr, 0, size); -- cgit v1.2.3