GameInput: a wired DualSense takes the title's rumble #715
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!715
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-715"
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?
@MrCheese5 on GitHub · 2026-11-24 04:01 UTC · original
MrCheese5:ds-c-rumble→main· +833 −5 · 8 files · 4 commits · openStacked on #552, #709 and #710; only the top commit belongs here.
When a DualSense over USB is the gamepad (no XInput controller answers), the title's low and high rumble from
SetRumbleStatenow reaches the DualSense's two motors as compatible vibration in output report 0x02. Before this change the rumble went to an XInput controller that was not there. A writer thread sends the report only when it changes, on a write handle of its own, so the title's thread never waits on HID.The reader from #552 becomes overlapped and also waits on a stop event. At process exit, the
NtTerminateProcesshook callsplaystation::shutdown(), which cancels the pending read and sends the motors to zero, because a DualSense keeps rumbling at the last level it got until it is switched off. Two seconds without a report count as a disconnect, because a controller that leaves Bluetooth range can leave a read pending without an error.Sending a report also sets the light bar and player LEDs to the report's defaults (dim blue, the middle player LED). A DualShock 4 still only reads.
What is in it
crates/xcl/src/hle/playstation.rs: overlapped reads with a stop event, the writer thread,rumble()andshutdown(), and a test that the report carries the levels and is sent only on changecrates/xcl/src/hle/gameinput.rs:set_rumble_stategoes to the DualSense when no XInput pad is connectedcrates/xcl/src/eh.rs:shutdown()at process exitREADME.md: a wired DualSense rumblesTested
cargo test -p xcl --lib playstation: 3 passedcargo test --workspace -- --test-threads=1: 699 passed, 0 failed, 41 ignored; SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64)--test-threads=4, GPU tests on this machine hang or lose the device tonight onmaintoo (bdab194and91f9a5e;bdab194had passed with 4 threads earlier the same night, and the driver logs GPU errors). Single-threaded,main91f9a5epasses (cargo test -p xcl --lib -- --test-threads=1: 647 passed, 0 failed).WriteFilesucceeded). Aftershutdown()the read loop ended.Regression run
Both runs use a fresh data root of their own. The title is not driven by a controller during the run, so this shows that nothing else changes, not the new path.
Not tested
AI use
🤖 Generated with Claude Code
@futurepro62 on GitHub · 2026-11-24 04:46 UTC · original
Tested exact head
e014fbc(on its base91f9a5e).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 699 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.Not tested
scripts/smoke.ps1(no title on this machine), AMD, a release build.AI use
@MesshM on GitHub · 2026-11-24 04:47 UTC · original
Test run of
e014fbcb63d1647c5d1bd884b070591fcdf39ccfon AMD RDNA4. I merged it onto currentmain64b3f35locally (clean merge), so the tree tested includes the stack under it (#552, #709, #710).Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 708 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 667 passed, 0 failed, 21 ignoredSKIPPED;dualsense_rumble_is_sent_when_it_changesand thedualsense_hapticstests pass (no DualSense attached here, so no output report reached a device).Review: Rumble goes to the DualSense only when it is the gamepad (no XInput controller answers) and only when the value changes. I reviewed the top commit only.
Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@JJAutoCompare on GitHub · 2026-11-25 06:18 UTC · original
Empirical test report (
e014fbcb)Hardware / environment
e014fbcb63d1647c5d1bd884b070591fcdf39ccf(detached checkout).0ef1bc386,x86_64-pc-windows-msvc), Cargo 1.100.0, DXC 1.9.2609.5 (01b62ad47).XCL_ADAPTER=NONE_CPU_ONLYandRUST_TEST_NOCAPTURE=1. Both commands ran outsideInvoke-ArcTest.ps1with zero Arc GPU mutex hold.Commands and results
cargo test --workspace --no-runexited 0 and built 15 test executables. It executed zero tests. The compiler emitted a deprecation warning forAtomicU32::fetch_updatein XGameRuntime.cargo test -p xcl --lib -- hle::dualsense_haptics::tests:: hle::dualsense_report::tests:: hle::playstation::tests::exited 0. The captured output reports 7 passed, 0 failed, 0 ignored, and 673 filtered out. It contains 0 lines matching the case-sensitive pattern^SKIPPED.Observed behavior
Not tested
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr715-focused.log and published.
@DavidM1911 on GitHub · 2026-11-25 11:38 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.