fix: Add as non-Steam game asks Steam to close again every 15 s (a Steam that was still starting ignored it)

This commit is contained in:
theupriser committed 2026-09-27 18:42:12 +02:00
1 parent 26139f3e0e
commit db7b2eb11c
2 files changed
+8 -3

No files matched your search

+6 -2
View File
@@ -62,8 +62,12 @@ steamgame_edit() {
steamgame_steam_busy && return 1
was_running=true
info "Closing Steam for a moment (it only reads its games list at startup)..."
steam -shutdown >/dev/null 2>&1
for ((i = 0; i < 60; i++)); do pgrep -x steam >/dev/null || break; sleep 1; done
# A Steam that's still starting ignores the request: ask again.
for ((i = 0; i < 90; i++)); do
((i % 15 == 0)) && steam -shutdown >/dev/null 2>&1
pgrep -x steam >/dev/null || break
sleep 1
done
pgrep -x steam >/dev/null && { err "Steam didn't close; nothing changed."; return 1; }
fi
"$1"; local rc=$?