proton: Add waitforexit verb

The Steam client only sets critical environment variables for the game
process itself, not for getcompatpath etc. This verb lets the Steam
client wait for the prefix to shut down so it can restart the prefix
with the variables set.

Required to avoid duplicate controllers when controller config support
is enabled, for example.
This commit is contained in:
Andrew Eikum 2018-08-06 08:06:16 -05:00
parent 234edf70f5
commit 17294f3b4a

3
proton
View file

@ -466,6 +466,9 @@ elif sys.argv[1] == "getnativepath":
#windows -> linux path
path = subprocess.check_output([wine_path, "winepath", sys.argv[2]], env=env, stderr=lfile)
sys.stdout.write(path)
elif sys.argv[1] == "waitforexit":
#wait for wineserver to shut down
run_wine([bindir + "/wineserver", "-w"])
else:
log("Need a verb.")
sys.exit(1)