Browse Source

win-capture: Fix "attempting to hook [executable]" message

The "attempting to hook [executable]" message would not display the
correct executable if it's fallen back to a different window with the
same window class.
jp9000 9 years ago
parent
commit
480d0e986f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      plugins/win-capture/game-capture.c

+ 3 - 2
plugins/win-capture/game-capture.c

@@ -1016,8 +1016,9 @@ static bool init_hook(struct game_capture *gc)
 					exe.array);
 		}
 	} else {
-		info("attempting to hook process: %s", gc->executable.array);
-		dstr_copy_dstr(&exe, &gc->executable);
+		if (get_window_exe(&exe, gc->next_window)) {
+			info("attempting to hook process: %s", exe.array);
+		}
 	}
 
 	blacklisted_process = is_blacklisted_exe(exe.array);