hle(display): fall back to no-op deferral when PowerSetRequest returns ERROR_NOT_SUPPORTED #1155
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1155"
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 Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T16:16:59Z.
Summary
Fixes #727
Full verification details and change notes are documented in #727 (commit
5c37528, based onmainffe310e).Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --checkon edited files: PASScargo xtask policy: PASS (zero game files/data)cargo clippy --all-targets --locked -- -D warnings(default +--features diagnosticswhere applicable): PASSAI-assisted; synthetic tests only, no game files.
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:11Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
5c37528:cargo test -p victory-hlepasses, 98 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:19:40Z.
Automated triage for the maintainers.
Merge candidate. This fixes #727. On some hosts (headless sessions, RDP, no display route),
PowerSetRequest(…, PowerRequestDisplayRequired)fails withERROR_NOT_SUPPORTED, soacquire_deferralincrates/victory-hle/src/modules/display.rsfailed andsdr_and_display_deferralsfailed with it.Now
finish_failed_deferralcloses the request in every failure case. ForERROR_NOT_SUPPORTEDonly, it logs once and returnsS_OKwith a non-null sentinel handle.close_deferral_withskips the OS calls for that sentinel and for null. Every other error still returnsHRESULT_FROM_WIN32, withGetLastErrorread beforeCloseHandle. The three new tests use closures in place of the OS calls, so they pass on any host.This overlaps #1664. That PR hands back a null handle with
S_OK, which a title may treat as a failure. The sentinel here is the safer choice, and this branch merges cleanly.CI: not run.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T21:59:24Z.
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing because the issue it fixes (#727, the unit test failing on hosts that refuse display power requests) was fixed in
mainbyefe102ed, and the runtime change makes no difference to the title: its one acquire site ignores the returned HRESULT and its one close site only closes a non-null handle, so a failed acquire already ends in a skipped close. Merged withmainit also leaves the NOT_SUPPORTED arm ofsdr_and_display_deferralsunreachable.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed