From d8b2e812c5e263e19aed57b6cfa236e6a202a2ea Mon Sep 17 00:00:00 2001 From: rickpeters Date: Sun, 27 Sep 2026 18:42:12 +0200 Subject: [PATCH] fix: Add as non-Steam game asks Steam to close again every 15 s (a Steam that was still starting ignored it) --- CHANGELOG.md | 3 ++- lib/steam-game.sh | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c8cab6..1593ea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ one per merged pull request. ## 2.5.1 - 2026-09-27 -- **docs: README screenshot at 2.5.1 with Add as non-Steam game** +- **fix: Add as non-Steam game asks Steam to close again every 15 s (a Steam that was still starting ignored it)** +- `3a0692f` **docs: README screenshot at 2.5.1 with Add as non-Steam game** - `e86ddcc` **feat: Add as non-Steam game: Steamify in the Steam library, under the shortcut; controller works when started from Steam** - `389bc33` **fix(ui): B never quits (Steam sends Esc for it), Ctrl+Q does; started from Steam, the hints show the Steam Controller's buttons** - `c6c1150` **fix(ui): Enter selects (a Steam Controller's A in Steam's desktop layout); Ctrl+Enter reviews and applies** diff --git a/lib/steam-game.sh b/lib/steam-game.sh index d7544a5..c7ea9c8 100644 --- a/lib/steam-game.sh +++ b/lib/steam-game.sh @@ -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=$?