From 4f4aea4562d1af90136edf64100dc5a6a604bb4e Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 15 Dec 2016 20:20:32 -0800 Subject: [PATCH] win-capture: Add debug messages when hooking These are helpful for debugging UWP capture issues. --- plugins/win-capture/game-capture.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/win-capture/game-capture.c b/plugins/win-capture/game-capture.c index 0e91d0f71..906e5467c 100644 --- a/plugins/win-capture/game-capture.c +++ b/plugins/win-capture/game-capture.c @@ -1582,6 +1582,8 @@ static inline bool init_shtex_capture(struct game_capture *gc) static bool start_capture(struct game_capture *gc) { + debug("Starting capture"); + if (gc->global_hook_info->type == CAPTURE_TYPE_MEMORY) { if (!init_shmem_capture(gc)) { return false; @@ -1647,6 +1649,7 @@ static void game_capture_tick(void *data, float seconds) } if (gc->hook_stop && object_signalled(gc->hook_stop)) { + debug("hook stop signal received"); stop_capture(gc); } if (gc->active && deactivate) { @@ -1674,10 +1677,13 @@ static void game_capture_tick(void *data, float seconds) } if (gc->hook_ready && object_signalled(gc->hook_ready)) { + debug("capture initializing!"); enum capture_result result = init_capture_data(gc); if (result == CAPTURE_SUCCESS) gc->capturing = start_capture(gc); + else + debug("init_capture_data failed"); if (result != CAPTURE_RETRY && !gc->capturing) { gc->retry_interval = ERROR_RETRY_INTERVAL;