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.
master
jp9000 2016-12-15 20:14:40 -08:00
parent a5337605cd
commit b3119e0a8d
1 changed files with 3 additions and 1 deletions

View File

@ -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());