Browse Source

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.
jp9000 9 years ago
parent
commit
b3119e0a8d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      plugins/win-capture/game-capture.c

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