From b3119e0a8d88c43b08997e908cb630a48404393d Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 15 Dec 2016 20:14:40 -0800 Subject: [PATCH] win-capture: Don't hard fail if thread ID not found Under certain circumstances, the program may not be able to acquire the window thread ID for a UWP process, but will be able to acquire the process ID. In this case, it should soft fail and retry, rather than assume it's unacquirable and stop trying to reacquire. --- plugins/win-capture/game-capture.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/win-capture/game-capture.c b/plugins/win-capture/game-capture.c index f5fe76d64..6dfde2c9b 100644 --- a/plugins/win-capture/game-capture.c +++ b/plugins/win-capture/game-capture.c @@ -1186,7 +1186,9 @@ static void try_hook(struct game_capture *gc) if (gc->process_id == GetCurrentProcessId()) return; - if (!gc->thread_id || !gc->process_id) { + if (!gc->thread_id && gc->process_id) + return; + if (!gc->process_id) { warn("error acquiring, failed to get window " "thread/process ids: %lu", GetLastError()); -- GitLab