Skip to content

Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit

Adding Caffeinate after launching to prevent mac from going to sleep on controller usage

Thomas Cool4282fbedaa5c
diff --git a/dylib/feats/compat_run.sh b/dylib/feats/compat_run.sh
index e086029..61b3998 100755
--- a/dylib/feats/compat_run.sh
+++ b/dylib/feats/compat_run.sh
@@ -1511,6 +1511,7 @@ lsregister="$lsregister/Frameworks/LaunchServices.framework/Support/lsregister"
[ -x "$lsregister" ] && "$lsregister" -f "$loader_app" >> "$log" 2>&1 || true
open -n -W -a "$loader_app" "$@" >> "$log" 2>&1 &
open_pid=$!
+/usr/bin/caffeinate -d -i -w "$open_pid" >> "$log" 2>&1 &
status=0
wait "$open_pid" || status=$?
echo "=== game exited status=$status, killing wine prefix ===" >> "$log" 2>&1 || true