GameInput: XCL_PRESS_HOLD holds scripted presses longer #609
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!609
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-609"
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?
@pablogonz12 on GitHub · 2026-11-24 02:27 UTC · original
pablogonz12:gameinput-press-hold→main· +24 −3 · 1 files · 1 commits · openXCL_PRESS_AT/XCL_PRESS_A_AThold each scripted button for 200 ms. A title that draws a frame every few seconds reads its pad about as seldom and misses such a press: a retail title under Wine here (about one frame in 4 s while its first screens load) never saw a scripted A; with the press held for 8 s it logsGameInput: gamepad buttons 0x4 pressed for the first time.XCL_PRESS_HOLD=sholds each press forsseconds; without it nothing changes.What is in it
crates/xcl/src/hle/gameinput.rs:XCL_PRESS_HOLD(seconds, > 0; default 0.2), read once; the test of a press moves intoheld(presses, t, hold); the module andparse_pressesdocs name the variable.a_press_is_held_for_its_hold_time.Tested
cargo xwin test --workspace --release --locked --target x86_64-pc-windows-msvc --no-run, then each of the 15 test binaries from its package folder under Wine (GE-Proton11-14, Mesa 26.3.1, DXC 1.9.2609.5, Rust 1.100.0, static CRT) with--test-threads=4; no filters, 0SKIPPEDlines on the head, 0 on the base:1178e8a): 679 passed, 7 failed, 41 ignored;main(cb868b2): 678 passed, 7 failed, 41 ignored.disk_free_space_ex_reports_pls_quota,gpu::recomp::tests::gpu_f64_math_random,gpu::recomp::tests::gpu_f64_roots,gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction,hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime,set_predication_buffer_state_and_kickoff,test_title_runs_and_game_folder_is_untouched.XCL_PRESS_AT=60:A,90:A,…withXCL_PRESS_HOLD=8: the A press is logged at 61 s; with the default 200 ms no press was logged in a 240 s run with presses every 10 s.Regression run
Both blocks are the output of each commit's own unmodified
scripts/smoke.ps1, written to a file by PowerShell and pasted as is. It ran in Windows PowerShell 7.7.0 (pwsh.exe) under Wine (GE-Proton11-14, Linux), not on native Windows, with MinGit 2.56.1 forgit;xcl.exeis an MSVC release build (cargo xwin, static CRT), passed with-Xcl. Host workarounds outside the script: a pseudo-terminal,DOTNET_SYSTEM_GLOBALIZATION_USENLS=1, and importing PowerShell's Utility and Management modules before calling it.mainis this PR's base commit; no scripted input in either run, so this is a regression check, not a run ofXCL_PRESS_HOLD. These replace the earlier blocks from a bash script. Frame counts at this speed are small and vary between runs. Each commit was run once. Note that this title can end in a device removal on this host even onmain(seen in repeat runs of another base commit, see #464).main:This PR's head:
Not tested
XCL_PRESS_HOLDwith the test title's e2e tests (they keep the default).AI use
@H0UNDZER0 on GitHub · 2026-11-24 03:05 UTC · original
Tested on an RTX 5080, release build: pass, 686 passed, 0 failed.
1178e8a37e78cc31c99f2d4e0883c7bebb6e7448, this PR's head as is (on its basecb868b2), release build.XCL_*variables set.cargo build --release --workspace --locked: OK, the same singlefetch_updatewarning asmain.cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4, run twice (the second with--show-output): 686 passed, 0 failed, 41 ignored both times. The basecb868b2gives 685 / 0 / 41 here: the difference is the newa_press_is_held_for_its_hold_time, which passes.SKIPPED: the usual 2,gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64).e2e) ends withfailures: 0.Not tested
XCL_PRESS_HOLDset: no suite test setsXCL_PRESS_ATorXCL_PRESS_A_AT; the new unit test checksheldon its own.main. When this was written that wasdd2ae9a;git merge-treeshowed no conflict.scripts/smoke.ps1.AI use: Claude Code (Claude Opus 5.5, Claude Fable 5.2)
@mikebuckets171 on GitHub · 2026-11-24 07:55 UTC · original
Mac/Wine verification of this head as filed (a second host for the counts, not a review of the design).
Tested
x86_64-pc-windows-gnullvm, LLVM-MinGW 20261117 as the linker.cb868b2(detached at the PR head, not the merged state):cargo build --workspace --lockedandcargo test --no-run --release --lockedgreen — 15 test executables, no new warnings from these files.press: 4 passed, 0 failed, 0 ignored,including this PR's own new
hle::gameinput::tests::a_press_is_held_for_its_hold_time(the rest of thefilter's matches are unrelated tests that happen to contain "press"). Nothing else in
gameinputchanged verdict.
What this host can and cannot say about the motivation
With #541 applied, this bench's port run presents ~24 fps and reads the pad continuously, and its own
scripted button run (the port's
XCL_REMOTE_INPUTknob: 176 presses in ~15 s held phases) reached thegamepad state every time. But I never ran
XCL_PRESS_ATwith the default 200 ms against a title state thatdraws one frame every few seconds, so I can neither confirm nor refute the failure mode this PR describes —
the Wine observation in your description (one frame in 4 s, a scripted A never seen, held 8 s and logged) is
the evidence for it, from a title state this bench does not reach.
Related: I have just filed #893 (
XCL_STICK_AT/XCL_LOOK_AT, a scripted thumbstick held from asecond until the next entry) for what
XCL_PRESS_ATcannot reach: movement and the camera. Its semanticssidestep the hold-length problem — an entry holds until the next one, so a slow-polling title cannot miss it —
and it applies after
kbminpoll(), so if both land the order stayskbm→ scripted buttons → scriptedsticks and the three compose without touching each other. I will rebase onto whichever lands first.
Not tested
unverified here.
AI use
@Alpha325 on GitHub · 2026-11-25 02:11 UTC · original
I tested
1178e8a37e78cc31c99f2d4e0883c7bebb6e7448on Windows 11 build 26200 with a debug MSVC build. The synthetic fixture callsgameinput::poll()in a fresh process for each setting, so each case readsXCL_PRESS_HOLDindependently.XCL_PRESS_HOLD=" 8 ", both scripted buttons were active (0xc) after the default 200 ms window would have expired. On the parent commitcb868b2, the same test failed with0x0.NaN, both presses had expired as expected (0x0).cargo test --offline --locked -p xcl --lib hle::gameinput::tests -- --test-threads=1returned 10 passed, 0 failed.The fixture uses synthetic input only. AI use — OpenAI Codex (GPT-6) wrote and ran the test and drafted this report.
@JJAutoCompare on GitHub · 2026-11-25 06:37 UTC · original
Empirical test report (
1178e8a3)Hardware / environment
1178e8a37e78cc31c99f2d4e0883c7bebb6e7448, checked out detached with a clean worktree.x86_64-pc-windows-msvc. DXC reported version 1.9.2609.5 (01b62ad47).XCL_ADAPTER=NONE_CPU_ONLYandRUST_TEST_NOCAPTURE=1. Both Cargo commands ran outsideInvoke-ArcTest.ps1with incremental compilation and dev/test debug info disabled.Commands and results
cargo test --workspace --no-runexited 0 and built the workspace test binaries. It executed zero tests.cargo test -p xcl --lib hle::gameinput::tests::exited 0. The log contained 10 passed, 0 failed, 0 ignored, 657 filtered out, and 0 case-sensitive lines beginning withSKIPPED.AtomicU32::fetch_updatein XGameRuntime.Observed behavior
The diff adds one unit test,
a_press_is_held_for_its_hold_time. The test passed and checked that a press is absent before its scheduled time and that A has expired half a second into a 200 ms hold. With an 8 s hold, A is still active at that point, A and B are both active while their holds overlap, and each button is released at its own end boundary. The other nine GameInput unit tests also passed.Not tested
The full GPU workspace suite and game smoke runs were omitted. Runtime parsing of
XCL_PRESS_HOLDwas outside the focused test's coverage. The PR adds no integration test.AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr609-focused.log and published.
@DavidM1911 on GitHub · 2026-11-25 12:58 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.Thanks!
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.