HLE: implement remaining XAccessibility closed-caption, high-contrast, and speech-to-text slots #2074
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2076"
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 fuzeofficlal on 2026-11-25T04:23:33Z.
Closes #865.
Summary
0x18,0x20): implementXClosedCaptionGetProperties(ClosedCaptionPropertiesmatching the 28-byte GDK layout, returningHRESULT_FROM_WIN32(ERROR_NOT_FOUND)while captions are disabled andS_OKonce enabled viaXClosedCaptionSetEnabled).0x28): implementXHighContrastGetModereportingXHighContrastMode::Off(0).0x30,0x38,0x88,0x90,0x98,0xa0): wire position hints, string submission, and monotonic non-zero hypothesis IDs across begin/update/finalize/cancel.Testing
crates/victory-hle/src/modules/speech.rscoveringClosedCaptionPropertiesfield offsets/layout, disabled -> enabled -> disabled state transitions, null out-pointer checks, high-contrast mode, and all speech-to-text slots.cargo test -p victory-hle --locked,cargo clippy --workspace --all-targets --all-features -- -D warnings, andcargo xtask policy.Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T04:26:32Z.
Review: COMMENTED
Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.
Remaining XAccessibility closed-caption/high-contrast implementations — accessibility API completeness; large-ish surface, statics only on macOS.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T04:44:50Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, Rust 1.98.1 MSVC):cargo test -p victory-hle --lib speech::— 4 passed, 0 failedcargo clippy -p victory-hle --all-targets— 0 warningscargo xtask policy— ok (183 files ok)Clean implementation of the remaining XAccessibility closed-caption, high-contrast, and speech-to-text slots with unit tests. Looks good.
AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T10:29:03Z.
Automated triage for the maintainers.
Merge candidate. This fills the remaining
missingslots of the accessibility object incrates/victory-hle/src/modules/speech.rs: closed captions (0x18/0x20), high contrast (0x28, reports off) and speech-to-text (0x30/0x38, 0x88..0xa0, log-only stubs plus hypothesis ids). Both points from the last note are done at8aa346c.caption_propertiesnow always fills the struct withenabledfollowingset_captions_enabledand returnsS_OK(E_INVALIDARGonly for a null pointer, through the sharedput). The code no longer names the console SDK; it uses public function names only, as the rest ofvictory-hledoes. The struct follows the public field order (28 bytes, asserted), and the tests cover the layout, the enable/disable cycle and the stubs. CI check: passing.For the maintainer: the order of the four hypothesis slots inside 0x88..0xa0 is inferred from main's grouping, not from a trace. Only 0x88 writes through an argument (its fifth, on the stack), so that slot is the one to watch if a run shows trouble. The PR description still mentions the old
ERROR_NOT_FOUNDbehaviour and the SDK name; please update it before merge so the squash message is clean.Reply to @fuzeofficlal: thanks, both changes are in and match what was asked.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T10:53:09Z.
Updated in
3ed35da8per triage feedback:ClosedCaptionPropertiesand reworded all comments to cite only the public Microsoft Learn GDK Game Accessibility (XAccessibility) API reference.0x18XClosedCaptionGetProperties,0x20XClosedCaptionSetEnabled,0x28XHighContrastGetMode,0x30XSpeechToTextSetPositionHint,0x38XSpeechToTextSendString, and0x88..=0xa0XSpeechToTextBegin/Update/Finalize/CancelHypothesisString).// shortcut:onNOT_FOUND(0x8007_0490): the publicXClosedCaptionGetPropertiesreference specifies that it succeeds only when closed captions are enabled (SUCCEEDED(...)) and otherwise returns an errorHRESULTwithout naming a specific code, soHRESULT_FROM_WIN32(ERROR_NOT_FOUND)is used as a disabled-state error distinct fromE_NOTIMPL, transitioning toS_OKonce0x20enables captions.Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T13:09:54Z.
Updated in
8aa346c6(rebased onto940d32f):caption_properties(slot0x18): Always writesClosedCaptionProperties(DEFAULT_CAPTIONSwithenabledreflectingCAPTIONS_ENABLED) and returnsS_OKwhenoutis non-null (E_INVALIDARGon null), removingNOT_FOUND. Updatedclosed_captions_follow_enabled_state_and_layoutaccordingly.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.