Add a GAME_DIRECTORY environment variable for the use of pre-launch and post-exit scripts. Re-comment a little bit to explain who would use this (and 'game_name').

This commit is contained in:
Daniel Johnson 2024-04-08 18:49:46 -04:00 committed by Mathieu Comandon
parent 56ebf85177
commit 310ec685b7

View file

@ -672,9 +672,14 @@ class Game(GObject.Object):
if env.get("WINEARCH") == "win32" and "umu" in " ".join(command):
raise RuntimeError("Proton is not compatible with 32bit prefixes")
env["game_name"] = self.name # What is this used for??
env["GAMEID"] = proton.get_game_id(self)
env["STORE"] = self.get_store_name()
# Some environment variables for the use of custom pre-launch and post-exit scripts.
env["game_name"] = self.name
if self.directory:
env["GAME_DIRECTORY"] = self.directory
self.game_runtime_config = {
"args": command,
"env": env,