From 9a155e24b8e19e27b31d6354c0b7c42b7b121301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Lidwin?= Date: Fri, 20 Sep 2024 10:54:44 +0200 Subject: [PATCH] fix: gta v trying to init steamapi for non-steam entries --- gamefixes-steam/271590.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gamefixes-steam/271590.py b/gamefixes-steam/271590.py index fb26acb3..e21352e6 100755 --- a/gamefixes-steam/271590.py +++ b/gamefixes-steam/271590.py @@ -1,9 +1,13 @@ """Game fix for GTAV""" +import os from protonfixes import util def main() -> None: """Game fix for GTAV""" - # Set SteamGameId so that non-steam versions can pick up steam-specific fixes in proton's wine code - util.set_environment('SteamGameId', '271590') + # Rockstar reads SteamAppId and tries to init Steam API + # We want to avoid this when running from Epic for example + game_id = os.environ.get("UMU_ID") + if game_id and not game_id.isnumeric(): + util.del_environment("SteamAppId")