Skip to content

fix: consolemode://stop and Start + Select close Big Picture / Playnite before restoring - #45

Merged
lippdev merged 3 commits into
lippdev:mainfrom
nextestudios:fix/stop-closes-front-end
Sep 30, 2026
Merged

lippdev merged 3 commits into
lippdev:mainfrom
nextestudios:fix/stop-closes-front-end

Conversation

@nextestudios

Copy link
Copy Markdown
Contributor

Summary

Leaving console mode from outside the session — consolemode://stop, or holding Start + Select — restored the monitors but left the front-end running, so Big Picture ended up on the desk monitor and had to be closed by hand.

Now those requests close the front-end first:

  • LaunchService.CloseFrontEnd: Big Picture via Steam's own steam://close/bigpicture (back to the desktop client), Playnite via CloseMainWindow; if still there halfway through, WM_CLOSE on its window.
  • MainViewModel.StopConsoleAsync: after closing it, the existing loop notices the exit and restores the desk on its own — the same path as when you exit Big Picture yourself — and it restores explicitly only if console mode is still active.
  • Xbox mode has no window of its own: it just restores, as before.
  • The tray's Restore is unchanged (restores only).
  • README (EN/PT) mentions it on the automation line.

Validation

🤖 Generated with Claude Code

…te before restoring

Leaving console mode from outside the session restored the monitors but left the front-end
running, so Big Picture ended up on the desk monitor and had to be closed by hand.
LaunchService.CloseFrontEnd asks Steam to leave Big Picture (steam://close/bigpicture) or
Playnite to close, falling back to WM_CLOSE on its window; MainViewModel.StopConsoleAsync then
lets the loop restore the desk on its own (the same path as exiting Big Picture yourself) and
restores explicitly only if console mode is still active. Xbox mode has no window and just
restores. The tray's Restore is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lippdev

lippdev commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Thanks for this one, closing Big Picture / Playnite before restoring is a real gap. It needs a few adjustments before it can go in:

  1. Rebase on main. It conflicts in App.xaml.cs and README.md. The README was slimmed down since: the automation line now lives in docs/GUIDE.md and docs/GUIDE.pt-BR.md, so please move the note about stop there instead.
  2. The wait in StopConsoleAsync is shorter than a real restore. It polls IsConsoleActive for 12 × 500 ms = 6 s, but a restore on a three-screen setup took about 9 s in the log. After the 6 s it calls RestoreNowAsync() while the restore started by the loop is still running. Engine.Stop() returns at once because of RestoreInProgress, so IsConsoleActive is set to false and the "restored" status is shown before the desk is actually back (and ReloadAsync() reads the screens mid-restore). Please also wait while Engine.State.RestoreInProgress is true (with a longer cap, say 30 s), and only restore explicitly if nothing is restoring.
  3. A product question: Start + Select now also quits Big Picture. Until now it only went back to the PC. If that is the intent, keep it, but please confirm that the session menu's Back to the PC still restores only, and Exit Console Mode is the one that exits.
  4. Conventions (see AGENTS.md): a changelog entry under ## [Unreleased] in both CHANGELOG.md and CHANGELOG.en-US.md, ending with the PR number, and a manual check in docs/TESTING.md (closing Big Picture and Playnite from consolemode://stop and from the chord).

CI now builds and tests on Windows for every PR, so you will see the result here after the rebase.

@lippdev
lippdev merged commit 7b88998 into lippdev:main Sep 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants