Browse Source

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.
jp9000 5 years ago
parent
commit
ef6a6827f4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      plugins/win-capture/graphics-hook/graphics-hook.h

+ 3 - 0
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);