mirror of
https://github.com/lutris/lutris
synced 2024-10-02 22:14:23 +00:00
Provide default GAMEID when creating prefix
This commit is contained in:
parent
a244174c02
commit
ab911fb42e
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue