From 6c17f3e1a1963b79367ad35b35496543053a1ca6 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Wed, 30 Jul 2025 10:57:00 -0600 Subject: [PATCH] steam_helper: Add SteamPath and ValvePlatformMutex env vars. CW-Bug-Id: #25738 --- steam_helper/steam.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/steam_helper/steam.c b/steam_helper/steam.c index 3965c78fa..e6c7bd8b1 100644 --- a/steam_helper/steam.c +++ b/steam_helper/steam.c @@ -801,6 +801,8 @@ int main(int argc, char *argv[]) if (getenv("SteamGameId")) { + WCHAR path[MAX_PATH], *p; + /* do setup only for game process */ event = CreateEventW( NULL, FALSE, FALSE, L"Steam3Master_SharedMemLock" ); @@ -811,6 +813,17 @@ int main(int argc, char *argv[]) set_active_process_pid(); + SetEnvironmentVariableW(L"SteamPath", L"C:\\Program Files (x86)\\Steam"); + *path = 0; + GetModuleFileNameW(NULL, path, ARRAY_SIZE(path)); + p = path; + while (*p) + { + if (*p == '\\') *p = '/'; + ++p; + } + SetEnvironmentVariableW(L"ValvePlatformMutex", path); + setup_steam_registry(); setup_steam_files();