From 0f84fcfbcb28d325d7c82b14016d3ab6225d7530 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 21 Aug 2024 12:50:56 +0200 Subject: [PATCH] exclude windows apps --- detect_game.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/detect_game.c b/detect_game.c index 8d252bc..a21f518 100644 --- a/detect_game.c +++ b/detect_game.c @@ -4,6 +4,8 @@ #define MAX_TITLE_LENGTH 256 static const char prefix[] = "C:\\Windows\\"; +static const char windowsapps[] = + "C:\\Program Files\\Common Files\\microsoft shared\\"; static const char gameBarExe[] = "GameBar.exe"; BOOL TestFullscreen(HWND hwnd) { @@ -66,6 +68,11 @@ __declspec(dllexport) int get_running_fullscreen_game_path(char *buffer, continue; } + result = strncmp(charPath, windowsapps, 47); + if (result == 0) { + continue; + } + result = strcmp(charPath + strlen(charPath) - 11, gameBarExe); if (result == 0) { continue;