Tell the end of a game started from the Steam shortcut as Play tells it, with a message box for a fatal one.

play_only, the --play path of the Steam shortcut, logged only "the game ended (code N)" in launcher.log: it read no FATAL line, added no note to the game's log and showed nothing, so a game that ended with 70, 71, 72 or a Windows status left the player with no word of why (as when Steam starts it while the window replaces a save, and it ends at once with "another copy of the game is running"). The 7b0dbeb1 change that logs every end touched the window's watch only. play_only now follows the run with GameRun, the Restart's copies too, and takes the same game_end as the window: the line in launcher.log, the note in the game's log, and a message box only for an end worth one (a FATAL line, 70, 71 or 72, a Windows status; not 0, nor 1 from Task Manager's End task). The logs are written before the box, which waits for OK while Steam still counts the game as running.

Not reproduced before the change in a game run: the audit's probe showed it with a stand-in process. Checks that passed: tests/launcher_test.py (214 tests, a new one for the Steam shortcut's ends with codes 70, 0xC0000005, 0 and 1, which fails before the change) and tools/check_content.py --staged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 17:12:51 -05:00
parent 8de99df6eb
commit 8f42883a74
3 changed files with 71 additions and 11 deletions

View File

@@ -75,7 +75,8 @@ Customize Launcher (on the home screen) makes the look the player's own:
Steam reads that file only when it starts and writes it back when it closes, so a running Steam is asked to close
first and started again after. The shortcut runs the launcher's `pythonw.exe` on `data/steam_play.pyw`, which
starts the launcher of `app/current.txt` with `--play`: the game starts as Play starts it, and the process waits
for it, so Steam counts the game as running while it is.
for it, so Steam counts the game as running while it is. Its end goes into the logs as Play's does, and a fatal
error or a crash gets a message box, as no window shows it.
The choices are `theme`, `custom_background`, `custom_panel`, `custom_buttons`, `background`, `background_dim`,
`animations` and `sounds` in `data/launcher.json`.