Keep waiting for a shortcut's Steam overview instead of dropping its cold launch (#914)

fix: keep waiting for a shortcut's Steam overview instead of dropping its launch

The cold-launch gate waited once for 45 s and, on a timeout, held the
launch URL for good. A library that loads slower than that (or a client
still at the sign-in screen) left the requested game never started, with
nothing on screen. Retry the wait up to 40 times, 45 s each, and launch
as soon as the overview exists. The no-overview case still does not
forward the CGameID.

Co-authored-by: ovurrsl <ovurrsl@users.noreply.github.com>
This commit is contained in:
Resul Övürandovurrsl authored and GitHub committed 2026-10-16 09:50:35 -04:00
1 parent dce7e7ece6
commit a422698f92
2 files changed
+41 -12

No files matched your search

@@ -545,18 +545,31 @@ case $mode in
until [ "$(xprop -root GAMESCOPE_FOCUSED_APP 2>/dev/null | sed -n 's/.*= *//p')" = 769 ] || [ "$SECONDS" -ge "$_bl_end" ]; do
sleep 1
done
if /usr/local/bin/droiddeck-agent --wait-steam-shortcut-overview "$_bl_held" 45; then
# A large library can take longer than one 45 s wait to load.
_bl_overview_status=1
_bl_overview_tries=0
while [ "$_bl_overview_tries" -lt 40 ]; do
if /usr/local/bin/droiddeck-agent --wait-steam-shortcut-overview "$_bl_held" 45; then
_bl_overview_status=0
else
_bl_overview_status=$?
fi
if [ "$_bl_overview_status" -ne 1 ]; then
break
fi
_bl_overview_tries=$((_bl_overview_tries + 1))
echo "== steam: shortcut overview not ready yet; Steam may still be loading the library (attempt $_bl_overview_tries of 40)"
sleep 2
done
if [ "$_bl_overview_status" -eq 0 ]; then
echo "== steam: shortcut overview ready; launching the requested game $_bl_held"
_bl_launch_ready=1
elif [ "$_bl_overview_status" -eq 3 ]; then
echo "== steam: not a shortcut CGameID; keeping the existing launch path"
sleep 4
_bl_launch_ready=1
else
_bl_overview_status=$?
if [ "$_bl_overview_status" -eq 3 ]; then
echo "== steam: not a shortcut CGameID; keeping the existing launch path"
sleep 4
_bl_launch_ready=1
else
echo "== steam: expected shortcut overview did not become ready; holding the launch URL"
fi
echo "== steam: expected shortcut overview did not become ready; holding the launch URL"
fi
if [ "$_bl_launch_ready" = 1 ]; then
echo "== steam: interface up; launching the requested game $_bl_held"