Skip to content

Commit

Permalink
Compare all node strings with target
Browse files Browse the repository at this point in the history
Closes #19
  • Loading branch information
dimtpap committed Sep 1, 2022
1 parent 00152f1 commit 8dab74d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions pipewire-audio-capture-app.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,10 @@ static bool node_is_targeted(struct obs_pw_audio_capture_app *pwac,
return false;
}

const char *cmp;
if (node->binary) {
cmp = node->binary;
} else if (node->name) {
cmp = node->name;
} else {
return false;
}

return (dstr_cmpi(&pwac->target_name, cmp) == 0) ^ pwac->except_app;
return (dstr_cmpi(&pwac->target_name, node->binary) == 0 ||
dstr_cmpi(&pwac->target_name, node->friendly_name) == 0 ||
dstr_cmpi(&pwac->target_name, node->name) == 0) ^
pwac->except_app;
}
/* ------------------------------------------------- */

Expand Down

0 comments on commit 8dab74d

Please sign in to comment.