win-capture: Make sure we don't try to hook ourselves
Can trigger when using "Hook any fullscreen application" is enabled and the projector is active.master
parent
853ec3cba0
commit
e5e5189c7b
|
@ -831,6 +831,10 @@ static void try_hook(struct game_capture *gc)
|
||||||
gc->thread_id = GetWindowThreadProcessId(gc->next_window,
|
gc->thread_id = GetWindowThreadProcessId(gc->next_window,
|
||||||
&gc->process_id);
|
&gc->process_id);
|
||||||
|
|
||||||
|
// Make sure we never try to hook ourselves (projector)
|
||||||
|
if (gc->process_id == GetCurrentProcessId())
|
||||||
|
return;
|
||||||
|
|
||||||
if (!gc->thread_id || !gc->process_id) {
|
if (!gc->thread_id || !gc->process_id) {
|
||||||
warn("error acquiring, failed to get window "
|
warn("error acquiring, failed to get window "
|
||||||
"thread/process ids: %lu",
|
"thread/process ids: %lu",
|
||||||
|
|
Loading…
Reference in New Issue