Repository navigation
Conversation
|
Win64 host-poll check for connected-pad glyph selection at 1496a6b + 0ff8a53 under Wine 11.22. The 9 glyph and 13 input-family unit tests passed. I also ran the real Host::begin → pad → observe logic with a synthetic XInput slot at the API boundary, then called the glyph selector on the published state.
Removing only the connected-pad publication from observe makes the new check fail at disconnect, with the old Xbox state still published. This covers the host polling and selection wiring with synthetic input. Physical USB/HID and actual glyph rendering were outside this fixture. MEASURED. AI-assisted (Codex). |
KelboLive
left a comment
There was a problem hiding this comment.
The gate and precedence look right: at the one glyph read, KeyboardMouse + a connected Xbox pad now keeps the keyboard movie (glyphs.rs:100-105), Sony still wins when both pads are attached (family.rs:93-101, test at :504), and CONNECTED_PAD is refreshed every observe so a connect/disconnect before the read is honoured. The core guard is mutation-pinned (removing it returns Some(PLAYSTATION_LIVE); reversing precedence fails the classification test), and 243/0/2 on leonida-hle.
Three things to settle before merge:
- It only covers a pad present at the read. The title reads the movie once, ~3 s in, so a pad connected later still gets PlayStation pieces from
live::followwritingFamily::Xbox(live.rs:387-404). The original symptom therefore persists for late connection — worth stating, or worth following up on. - A DS4Windows/HidHide-mirrored Sony pad is classified as Xbox (
connected_pad_fromignoresmirror,family.rs:93-101), so a keyboard start loses the live movie even though the input path treats the mirror as PlayStation (gameinput.rs:1682). That is a behavioural regression for that configuration. - Docs still describe the old default:
docs/gameinput.md:536anddocs/prompt_glyphs.md:322need the new rule.
Also, one test gap: removing the per-poll publication in observe leaves the full suite at 243/0 — the new coverage is pure-function only, so mid-session connect/disconnect of a real Host is untested. A hub-level test would pin the wiring.
Non-blocking, but worth a sentence in the body: the issue suggested the title's own Xbox movie; this serves the keyboard one instead, so an Xbox pad first used after the read shows key caps for the session. That is a reasonable trade-off, just not an obvious one.
Merge is clean against current main (21 commits behind, no conflict); the red check/linux-python-and-viewer jobs are inherited from the stale base (the test_piecewise_parse/wave_diff/x64_recomp failures main fixed in 9b7674d6), not this diff.
Claimed in the coordination issue as:
D3D12-GLYPHS-CONNECTED-XBOX-PAD(#2570 (comment))What and why
Fixes
@alpfilho's finding (#2570 (comment)):active_family()toFamily::KeyboardMouse.glyphs::live_set_forthen servedPLAYSTATION_LIVE(ps_live_prompt_glyphs.gfx) unlessLEONIDA_PROMPTS_PAD=xboxwas set, causing subsequent Xbox pad inputs to display PlayStation prompts.d3d12/crates/leonida-hle/src/modules/gameinput/family.rs&gameinput.rs: trackconnected_pad()(Option<Family>, preferring Sony over XInput, updated inHost::beginandHost::observe).d3d12/crates/leonida-hle/src/modules/glyphs.rs: passconnected_pad()intolive_set_for; whenfamilyisKeyboardMouseandLEONIDA_PROMPTS_PADis unset (orauto), a connectedFamily::Xboxpad returnsNone(keepingKEYBOARDinstead ofPLAYSTATION_LIVE), whileLEONIDA_PROMPTS_PAD=playstationstill explicitly overrides it.Tested
connected_pad == Some(Family::Xbox)arm inlive_set_for):cargo test --locked -p leonida-hle --lib connected_xbox_pad_does_not_get_playstation_live_movie_on_keyboard_start: 0 passed, 1 failed (panicked returningPLAYSTATION_LIVEinstead ofNone).1496a6bd2):cargo test --locked -p leonida-hle: 245 passed, 0 failed across all unit/doc/integration targets (243 lib + 1 doc/lib? -- exact counts: 1 + 243 + 1 passed, 2 ignored, 0 failed).cargo check --workspace --all-targets --locked: passed.python -I scripts/check_no_game_data.py: clean.cargo clippy --locked -p leonida-hle --no-deps --all-targets -- -D warningshas 0 warnings in the touched files; only hits the pre-existingmodules/glyphs/live.rs:121lint tracked in d3d12: fix remaining workspace clippy warnings #2873.)GPUs tested: n/a (CPU/HLE unit tests on Windows 10 Pro 22H2 build 19045, Ryzen 9 5950X 16C/32T)
AI-assisted: Antigravity (plus separate read-only reviewer subagent)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).