GameInput: a wired DualSense takes the title's rumble #710
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ivall/xcl. Originally posted by MrCheese5 on 2026-11-24T04:01:25Z.
Stacked 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
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T04:46:56Z.
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
Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T04:47:44Z.
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.
upstream-sync referenced this pull request2026-11-24 19:06:45 +00:00
upstream-sync referenced this pull request2026-11-25 03:04:25 +00:00
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T06:18:26Z.
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.
upstream-sync referenced this pull request2026-11-25 11:07:09 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T11:38:56Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.upstream-sync referenced this pull request2026-11-25 15:05:51 +00:00
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:41:52Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:00:08Z.
Triage (#1607) – head
e014fbcStacked on #709 and #710 (and #552, now merged); only
e014fbcbbelongs here. #731 builds on top of it. The shared lines come from the stack, so this is not a duplicate. No other open or merged PR sends rumble to a DualSense (#2081 only reads Bluetooth input reports).No problems found in
playstation.rs(writer thread, overlapped reads,shutdownfrom the NtTerminateProcess hook) or ingameinput.rs:set_rumble_state.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.