From 17e5d17415bdf4cb3be6238c483372fe340e17b9 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 18 Apr 2026 07:58:44 +0200 Subject: [PATCH] Game detection: ignore steam fossilize processes --- meson.build | 2 +- project.conf | 2 +- tools/gsr-game-tracker/main.c | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index ca5cf0a..7b978b7 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('gsr-ui', ['c', 'cpp'], version : '1.11.0', default_options : ['warning_level=2', 'cpp_std=c++17'], subproject_dir : 'depends') +project('gsr-ui', ['c', 'cpp'], version : '1.11.1', default_options : ['warning_level=2', 'cpp_std=c++17'], subproject_dir : 'depends') add_project_arguments('-D_FILE_OFFSET_BITS=64', language : ['c', 'cpp']) diff --git a/project.conf b/project.conf index b43a712..62f86a4 100644 --- a/project.conf +++ b/project.conf @@ -1,7 +1,7 @@ [package] name = "gsr-ui" type = "executable" -version = "1.11.0" +version = "1.11.1" platforms = ["posix"] [lang.cpp] diff --git a/tools/gsr-game-tracker/main.c b/tools/gsr-game-tracker/main.c index 7b1f21d..36b004f 100644 --- a/tools/gsr-game-tracker/main.c +++ b/tools/gsr-game-tracker/main.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -106,11 +107,13 @@ static void check_process(pid_t pid) { char path[64]; ssize_t env_n, cmd_n; + bool is_steam_fossilize = false; snprintf(path, sizeof(path), "/proc/%d/environ", pid); env_n = read_file(path, environ_buf, sizeof(environ_buf)); if (env_n > 0) { + is_steam_fossilize = env_get(environ_buf, env_n, "STEAM_FOSSILIZE_DUMP_PATH_READ_ONLY"); const char *appid = env_get(environ_buf, env_n, "SteamAppId"); if (!appid) appid = env_get(environ_buf, env_n, "SteamGameId"); if (appid && appid[0] >= '1' && appid[0] <= '9') { @@ -122,7 +125,7 @@ static void check_process(pid_t pid) { snprintf(path, sizeof(path), "/proc/%d/cmdline", pid); cmd_n = read_file(path, cmdline_buf, sizeof(cmdline_buf)); - if (cmd_n > 0 && (is_wine_binary(cmdline_buf) || has_game_arch_suffix(cmdline_buf)) && !memmem(cmdline_buf, cmd_n, "d3ddriverquery", 14)) + if (cmd_n > 0 && (is_wine_binary(cmdline_buf) || has_game_arch_suffix(cmdline_buf)) && !is_steam_fossilize) add_game(pid); }