From ef6a6827f4a474e2fbe66335880664978fd243ad Mon Sep 17 00:00:00 2001 From: jp9000 Date: Wed, 8 Jan 2020 18:21:39 -0800 Subject: [PATCH] win-capture/graphics-hook: Add flog and flog_hr Allows automatically outputting the function name as part of the hook logging. This really doesn't need to be a manual process. Makes code a bit cleaner when used. --- plugins/win-capture/graphics-hook/graphics-hook.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/win-capture/graphics-hook/graphics-hook.h b/plugins/win-capture/graphics-hook/graphics-hook.h index 6e2d791d8..e6d13d49d 100644 --- a/plugins/win-capture/graphics-hook/graphics-hook.h +++ b/plugins/win-capture/graphics-hook/graphics-hook.h @@ -28,6 +28,9 @@ static inline HMODULE get_system_module(const char *module); static inline HMODULE load_system_library(const char *module); extern uint64_t os_gettime_ns(void); +#define flog(format, ...) hlog("%s: " format, __FUNCTION__, ##__VA_ARGS__) +#define flog_hr(text, hr) hlog_hr(__FUNCTION__ ": " text, hr) + static inline bool capture_active(void); static inline bool capture_ready(void); static inline bool capture_should_stop(void);