From df88c6a67c13648ef65c6368986058d292e2a2a8 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Tue, 5 Jan 2021 16:07:42 -0800 Subject: [PATCH] expose HookLogFunctions --- include/Refresh.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/Refresh.h b/include/Refresh.h index ad83c6e..ef90b3e 100644 --- a/include/Refresh.h +++ b/include/Refresh.h @@ -629,6 +629,18 @@ REFRESHAPI uint32_t Refresh_LinkedVersion(void); typedef void (REFRESHCALL * Refresh_LogFunc)(const char *msg); +/* Reroutes Refresh's logging to custom logging functions. + * + * info: Basic logs that might be useful to have stored for support. + * warn: Something went wrong, but it's really just annoying, not fatal. + * error: You better have this stored somewhere because it's crashing now! + */ +REFRESHAPI void Refresh_HookLogFunctions( + Refresh_LogFunc info, + Refresh_LogFunc warn, + Refresh_LogFunc error +); + /* Device */ /* Create a rendering context for use on the calling thread.