The screen: a display request held for the whole run (a pad never counts as input) #1870

Manually merged
github merged 1 commit from github-bot/gh-1870 into main 2026-11-29 08:21:06 +00:00 AGit
Owner

@⁠Kikerlai on GitHub · 2026-11-29 01:12 UTC · original
Kikerlai:main → main · +149 −0 · 4 files · 1 commits · merged 2026-11-29 08:16 UTC

[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 sets PowerRequestDisplayRequired and PowerRequestSystemRequired on it; the guard clears both and closes the request when dropped. A host that refuses it gives None and 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=0 leaves 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

  • GPU and profile: Windows host, a session on the pad alone, display timeout short enough to see it.
  • Before: the picture went off mid-session with the pad still in hand.
  • After: it stays on for the whole run; VICTORY_KEEP_AWAKE=0 brings the old behaviour back.
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): no shader changes.
  • cargo test passed 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 --release finishes with the warnings already in the tree.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: none open about the screen turning off on pad input.
**@⁠Kikerlai** on GitHub · 2026-11-29 01:12 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1870) `Kikerlai:main` → `main` · +149 −0 · 4 files · 1 commits · merged 2026-11-29 08:16 UTC [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 sets `PowerRequestDisplayRequired` and `PowerRequestSystemRequired` on it; the guard clears both and closes the request when dropped. A host that refuses it gives `None` and 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=0` leaves 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 - GPU and profile: Windows host, a session on the pad alone, display timeout short enough to see it. - Before: the picture went off mid-session with the pad still in hand. - After: it stays on for the whole run; `VICTORY_KEEP_AWAKE=0` brings the old behaviour back. - For shader changes, the wave sizes tested (32 and/or 64 lanes): no shader changes. - `cargo test` passed 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 --release` finishes with the warnings already in the tree. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: none open about the screen turning off on pad input.
Ported from the older checkout: crates/victory-hle/src/awake.rs holds PowerRequestDisplayRequired and PowerRequestSystemRequired on one power request for the whole run, let go when main returns. VICTORY_KEEP_AWAKE=0 leaves the power plan alone. The title pad talks through GameInput, which the host activity timer never counts, so Windows turned the picture off mid-session.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 01:13:09 +00:00
Author
Owner

@⁠amazedturnip on GitHub · 2026-11-29 05:38 UTC · original

Tested on Windows 11 (9800X3D + RTX 5070 Ti) across 20+ min sessions. Display stayed awake throughout with zero side effects on exit.

**@⁠amazedturnip** on GitHub · 2026-11-29 05:38 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1870#issuecomment-7251377054) Tested on Windows 11 (9800X3D + RTX 5070 Ti) across 20+ min sessions. Display stayed awake throughout with zero side effects on exit.
github manually merged commit 4a9ec0ffdf into main 2026-11-29 08:21:06 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1870
No description provided.