GameInput: DualSense trigger rumble on the adaptive triggers, rumble on the haptics #726
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/731"
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:14:20Z.
Stacked on #552, #709, #710 and #715; only the top commit belongs here.
The trigger levels from
SetRumbleState(the console's impulse triggers) now drive a wired DualSense's adaptive triggers. A trigger either vibrates with an amplitude and frequency that follow the level, or resists as strongly as the level, with an optional resting resistance. Withhaptics = "auto", when the controller's USB audio output has 4 channels, the low and high levels play on its haptic actuators through the player from #710 instead of compatible vibration, and the report then leaves the actuators to the audio."auto" is opt-in, and the default "rumble" keeps compatible vibration as in #715. In a 60 s smoke run of the retail title on this machine with the controller connected, "auto" cost about a third of the presents (24 instead of 35 every 2 s, steady). I don't understand that yet.
shutdown()stops the haptics and lets the triggers go, so neither stays stiff after the title exits.[dualsense]inxcl.toml:triggers: "vibration" (default), "resistance" or "off"trigger_strength: 0–1trigger_resistance: 0–1, resistance between rumbleshaptics: "rumble" (default), "auto" or "off"rumble_strength: 0–1haptics_device: part of the audio output's nameWhat is in it
crates/xcl/src/config.rs:DualSenseConfigand a test of a partial[dualsense]tablecrates/xcl/src/hle/playstation.rs: trigger effects from the levels, motors or haptics, haptics start at connect and stop at disconnect or exit, with tests of the mappingcrates/xcl/src/hle/gameinput.rs: all four rumble levels go to the DualSenseREADME.md: the settingsTested
cargo test -p xcl --lib playstation config: all passed (the 4 playstation tests and the config tests)cargo test --workspace -- --test-threads=1: 702 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).shutdown().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
haptics = "auto"costs frames (see above). That's why it's off by default.AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by RandomGithub12309 on 2026-11-24T04:39:45Z.
Test run and review of
2b03a8bf98ed0a3673c45ac86ee9ef2b34595ccamerged cleanly ontomain(f4ce27c):Tested
32.0.16.2114, wave32, SM 6.6), Intel Core Ultra 7 255HX (20 cores), Windows 11 Build 26300,rustc 1.100.0stable-x86_64-pc-windows-msvc, debug buildcargo build --workspace+cargo test --workspace -- --test-threads=4config::tests::dualsense_section_is_read_with_defaults_for_the_rest,dualsense_haptics::tests::*,dualsense_report::tests::*, and all 5playstation::tests::*pass)SKIPPED:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64)Review
haptics::startrace (crates/xcl/src/hle/playstation.rs,crates/xcl/src/hle/dualsense_haptics.rs):read_until_gonespawns"xcl dualsense haptics start"to runhaptics::start(&device), whileread_until_goneexit andplaystation::shutdown()callhaptics::stop()(STOP.store(true)). Becausehaptics::startunconditionally runsSTOP.store(false, Ordering::Release)without checkingSHUTDOWNor synchronizing againststop(), unplugging or shutting down before the worker reachesSTOP.store(false)clears the stop signal and leaves the WASAPI thread running until process exit. Also, ifrx.recv_timeout(3s)times out,startreturnsfalsewithout settingSTOP = true.Not tested
xcl-smoke)AI use
2b03a8bontof4ce27c, audited the diff, ran the workspace suite, and wrote this report.Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-24T04:47:00Z.
Tested on Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, wave32).
Tested
2b03a8bf98ed0a3673c45ac86ee9ef2b34595cca(pr-731, clean tree)8024 MiB VRAM, driver32.0.16.2101),rustc 1.100.0(x86_64-pc-windows-msvc, MSVC14.44.35207), DXC1.9.2602.17(SDK10.0.26100.0),--releasecargo test --workspace --release --no-fail-fast -- --test-threads=4: 702 passed, 0 failed, 41 ignored, exit0;2 (no wave64)skipped (gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware)Regression run (
scripts/smoke.ps1, 60 s,XCL_NETWORK=0, title folder name redacted)main (
64b3f35):PR #731 (
2b03a8b):Not tested: Physical DualSense controller hardware (adaptive triggers / USB audio haptics), debug build,
XCL_SAMPLE_*tests on this branch, AMD / wave64 hardware.AI use: Antigravity (
Gemini 4 Hydrogen) ran the build, tests, and smoke runs and drafted this report from the command outputs.Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T05:00:48Z.
Test run of
2b03a8bf98ed0a3673c45ac86ee9ef2b34595ccaon AMD RDNA4. I merged it onto currentmain64b3f35locally (clean merge), so the tree tested includes the stack under it (#552, #709, #710, #715).Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 711 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 670 passed, 0 failed, 21 ignoredSKIPPED;trigger_rumble_becomes_trigger_effectsandrumble_levels_go_to_the_motors_or_the_hapticspass (no DualSense attached).Review: I reviewed the top commit only, as the description asks.
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.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T06:18:23Z.
Empirical test report (
2b03a8bf)Hardware / environment
2b03a8bf98ed0a3673c45ac86ee9ef2b34595cca, verified in a clean detached checkout.x86_64-pc-windows-msvc, DXC 1.9.2609.5 (01b62ad47). Unoptimized test profile with debug info and incremental compilation disabled.XCL_ADAPTER=NONE_CPU_ONLYandRUST_TEST_NOCAPTURE=1. The compile check and focused runs ran outside the Arc test wrapper.Commands and results
cargo test --workspace --no-runexited 0 and compiled the workspace test executables.cargo test -p xcl --lib config::tests::dualsense_section_is_read_with_defaults_for_the_restexited 0. 1 passed, 0 failed, 0 ignored, 0 skipped.cargo test -p xcl --lib hle::dualsense_haptics::tests::exited 0. 2 passed, 0 failed, 0 ignored, 0 skipped.cargo test -p xcl --lib hle::dualsense_report::tests::exited 0. 2 passed, 0 failed, 0 ignored, 0 skipped.cargo test -p xcl --lib hle::playstation::tests::exited 0. 5 passed, 0 failed, 0 ignored, 0 skipped.Total across all four focused runs was 10 passed, 0 failed, 0 ignored, 0 skipped. The skip count is the number of case-sensitive lines starting with
SKIPPED.Observed behavior
Not tested
Physical DualSense hardware, the full GPU workspace suite, and game smoke runs were omitted.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr731-focused.log and published.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T11:38:52Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:41:50Z.
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:57Z.
Triage (#1607) – head
2b03a8bStacked on #715, #710 and #709 (and #552, now merged); only
2b03a8bfbelongs here. The overlap with those PRs is the stack, not a duplicate. No other open or merged PR drives the adaptive triggers or the USB-audio haptics.No problems found:
trigger_effect/levels_reportmatch the report builder from #709, andshutdownsendsOutput::default(), which hasrumble: Some((0, 0)), so the motors are stopped and the triggers released.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.