diff --git a/lutris/runners/commands/wine.py b/lutris/runners/commands/wine.py index ce138b3fe..c783827ad 100644 --- a/lutris/runners/commands/wine.py +++ b/lutris/runners/commands/wine.py @@ -157,6 +157,7 @@ def create_prefix( logger.error("No user.reg found after prefix creation. Prefix might not be valid") return else: + wineenv["GAMEID"] = proton.DEFAULT_GAMEID wineenv["PROTONPATH"] = proton.get_proton_path_from_bin(wine_path) system.execute([proton.get_umu_path(), "createprefix"], env=wineenv) diff --git a/lutris/util/wine/proton.py b/lutris/util/wine/proton.py index aaaddafbd..ceaa501af 100644 --- a/lutris/util/wine/proton.py +++ b/lutris/util/wine/proton.py @@ -9,7 +9,7 @@ from lutris.util import system from lutris.util.steam.config import get_steamapps_dirs GE_PROTON_LATEST = _("GE-Proton (Latest)") - +DEFAULT_GAMEID = "umu-default" def is_proton_path(wine_path): return "Proton" in wine_path and "lutris" not in wine_path @@ -96,10 +96,9 @@ def get_proton_path_from_bin(wine_path): def get_game_id(game): - default_id = "umu-default" games_path = os.path.join(settings.RUNTIME_DIR, "umu-games/umu-games.json") if not os.path.exists(games_path): - return default_id + return DEFAULT_GAMEID with open(games_path, "r", encoding="utf-8") as games_file: umu_games = json.load(games_file) for umu_game in umu_games: @@ -112,4 +111,4 @@ def get_game_id(game): and umu_game["appid"] == game.appid ): return umu_game["umu_id"] - return default_id + return DEFAULT_GAMEID