hle(display): fall back to no-op deferral when PowerSetRequest returns ERROR_NOT_SUPPORTED #1155
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1155
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1155/head"
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?
@geiyiliyabumo on GitHub · 2026-11-24 16:16 UTC · original
geiyiliyabumo:fix/display-deferral-not-supported→main· +102 −12 · 1 files · 1 commits · closed without mergingSummary
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.
@Zipettte on GitHub · 2026-11-24 18:01 UTC · original
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).
@Marvisak on GitHub · 2026-11-25 01:19 UTC · original
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
@Marvisak on GitHub · 2026-11-25 21:59 UTC · original
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