exclude windows apps

This commit is contained in:
Mylloon 2024-08-21 12:50:56 +02:00
parent 34812a49cc
commit 0f84fcfbcb
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -4,6 +4,8 @@
#define MAX_TITLE_LENGTH 256 #define MAX_TITLE_LENGTH 256
static const char prefix[] = "C:\\Windows\\"; static const char prefix[] = "C:\\Windows\\";
static const char windowsapps[] =
"C:\\Program Files\\Common Files\\microsoft shared\\";
static const char gameBarExe[] = "GameBar.exe"; static const char gameBarExe[] = "GameBar.exe";
BOOL TestFullscreen(HWND hwnd) { BOOL TestFullscreen(HWND hwnd) {
@ -66,6 +68,11 @@ __declspec(dllexport) int get_running_fullscreen_game_path(char *buffer,
continue; continue;
} }
result = strncmp(charPath, windowsapps, 47);
if (result == 0) {
continue;
}
result = strcmp(charPath + strlen(charPath) - 11, gameBarExe); result = strcmp(charPath + strlen(charPath) - 11, gameBarExe);
if (result == 0) { if (result == 0) {
continue; continue;