[pr-fix][startup] play: ask a question only when it can be seen (Play-MyRig) #132
Loading…
Reference in a new issue
No description provided.
Delete branch "1rascen/Darner:ask-only-when-seen"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Contributor role (optional)
What it changes
Play-MyRig.cmd(scripts\play-rig.ps1) startsdarner.exe playwith its output piped and read line by line (& $runner @playArgs 2>&1 | ForEach-Object); its input is still the console. A question printed without a new line (print!, thenread_line) never reaches the screen there, so the start waits for an answer nobody sees.1a5286a78started fromPlay-MyRig.cmdon an RTX 5080 stopped with nothing more on the screen. A build with this change on top of85c11db93went on into the game.c9925327a), the hang85c11db93describes. Since85c11db93that offer gives up after 20 s, but under Play-MyRig it is still not shown, so the 20 s look like a hang. The DLSS, FSR and MFG Unlocker download offers and the Direct3D 12 runtime question read their answer the same way, with no time limit. When they are due, a start through Play-MyRig would wait for them unseen with no end. One example is Windows 10 withoutD3D12\D3D12Core.dll, where Play-MyRig's own check says darner.exe will offer to fetch it. Neither was seen.This adds
can_ask(): stdin and stdout are both a console. Those five questions use it instead of checking stdin alone. When it is false, each takes the path it already takes when stdin is not a console:darner rig --writeapply the picks at any time);A start from a console asks exactly as before.
hold_windowis unchanged: only a start in a console of its own reaches it.How it was tested
d9f725692(on57dea7f23)cargo clippy -p darner --all-targets --target x86_64-pc-windows-gnu --locked -- -D warningspasses;cargo xtask policy: "asset policy: 553 files ok".85c11db93, started fromPlay-MyRig.cmdon an RTX 5080: the start went on into the game.cargo testwas not run. The DLSS, FSR, MFG Unlocker and Direct3D 12 questions were not due on that PC, so their paths under Play-MyRig were not reached.Checklist
main.docs/asset-policy.md.Checked for overlap
apps/darner/src/play.rs, none of them in these functions: #9, #12, #16, #36, #59, #75, #80.🤖 Generated with Claude Code
play: ask a question only when it can be seen (Play-MyRig reads the output line by line)to [pr-fix][startup] play: ask a question only when it can be seen (Play-MyRig)