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();