libobs_window_helper/
game.rs

1/// List is taken from <https://github.com/obsproject/obs-studio/blob/ce6f9a4742b40b04e68ef759e0698bd5eac4360e/plugins/win-capture/game-capture.c#L1040>
2const BLACKLISTED_EXE: &'static [&'static str] = &[
3    "explorer",
4    "steam",
5    "battle.net",
6    "galaxyclient",
7    "skype",
8    "uplay",
9    "origin",
10    "devenv",
11    "taskmgr",
12    "chrome",
13    "discord",
14    "firefox",
15    "systemsettings",
16    "applicationframehost",
17    "cmd",
18    "shellexperiencehost",
19    "winstore.app",
20    "searchui",
21    "lockapp",
22    "windowsinternal.composableshell.experiences.textinput.inputapp",
23];
24
25pub fn is_blacklisted_window(exe: &str) -> bool {
26    let exe_lowercase = exe.to_lowercase();
27    let exe_lowercase = exe_lowercase.trim_end_matches(".exe");
28
29    BLACKLISTED_EXE
30        .iter()
31        .any(|&blacklisted_exe| blacklisted_exe == exe_lowercase)
32}