The screen: a display request held for the whole run (a pad never counts as input) #1870
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1870"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Kikerlai on 2026-11-29T01:12:07Z.
[pr-fix]
Fixes #
What it changes
A pad is not a keyboard or a mouse: the title's input arrives through GameInput's synthetic pad, and the host's own activity timer never sees it. After the power plan's display timeout Windows turned the picture off with the pad still being worked, mid-cutscene or mid-chase, and the machine could then sleep too. The console's shell holds a display deferral for the running title; this holds one on the host.
crates/victory-hle/src/awake.rs(new):hold()creates one power request (PowerCreateRequest) and setsPowerRequestDisplayRequiredandPowerRequestSystemRequiredon it; the guard clears both and closes the request when dropped. A host that refuses it givesNoneand the run goes on.apps/victory/src/run.rs: the guard is held across the title's main thread, taken before the title starts, and one line says what happened.VICTORY_KEEP_AWAKE=0leaves the power plan alone. The title's own shell deferral (modules::display) is untouched: both requests can be held at once.README.md: a Playing it bullet says so.How it was tested
VICTORY_KEEP_AWAKE=0brings the old behaviour back.cargo testpassed for the crates it touches: yes,cargo test -p victory-hle awake(2 passed, 0 failed:the_switch_is_on_unless_asked_off,a_request_is_taken_and_let_go).cargo build --releasefinishes with the warnings already in the tree.Checked for overlap
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by amazedturnip on 2026-11-29T05:38:52Z.
Tested on Windows 11 (9800X3D + RTX 5070 Ti) across 20+ min sessions. Display stayed awake throughout with zero side effects on exit.