GameInput: read a DualSense and a DualShock 4's full reports over Bluetooth #2081

Open
github-bot wants to merge 1 commit from github-bot/gh-2081 into main AGit
Owner

@⁠sheazywi on GitHub · 2026-11-25 03:27 UTC · original
sheazywi:playstation-bluetooth-reports → main · +67 −22 · 2 files · 1 commits · draft

A DualSense over Bluetooth was not read (known() skipped it), and a DualShock 4's full Bluetooth report (0x11) was ignored. This reads them: the simple 0x01 report a DualSense sends over Bluetooth, its full 0x31 report, and the DualShock 4's 0x11. USB behaviour is unchanged.

What is in it

  • crates/xcl/src/hle/playstation.rs: parse picks the layout by pad and report id (shared state decoder); known() no longer excludes a Bluetooth DualSense; new test that the Bluetooth reports read as the same gamepad state as USB, existing tests updated.
  • README.md: DualSense over Bluetooth.

Tested

  • Windows 11 Pro 10.0.26200, RTX 4070 Ti, Rust 1.98.1, debug build
  • cargo build --workspace then cargo test --workspace -- --test-threads=4: all passed, 0 failed (lib: 1099 passed, 26 ignored)
  • SKIPPED: shaders::tests::pso_measurement_compiles_an_exact_synthetic_record (needs Developer Mode), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)

Regression run

  • not done (see Not tested)

Not tested

  • No real DualSense or DualShock 4 over Bluetooth: the report layouts come from a reader I wrote for another project and are checked only by the unit tests with synthetic reports.
  • scripts/smoke.ps1 on main vs this head was not run; the change only touches how a PlayStation pad's HID reports are decoded.
  • AMD GPUs.

AI use

  • Claude Code with Claude Sonnet 5.5 wrote the code, tests and this description; I reviewed the diff.
**@⁠sheazywi** on GitHub · 2026-11-25 03:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/2081) `sheazywi:playstation-bluetooth-reports` → `main` · +67 −22 · 2 files · 1 commits · draft A DualSense over Bluetooth was not read (`known()` skipped it), and a DualShock 4's full Bluetooth report (0x11) was ignored. This reads them: the simple 0x01 report a DualSense sends over Bluetooth, its full 0x31 report, and the DualShock 4's 0x11. USB behaviour is unchanged. **What is in it** - `crates/xcl/src/hle/playstation.rs`: `parse` picks the layout by pad and report id (shared `state` decoder); `known()` no longer excludes a Bluetooth DualSense; new test that the Bluetooth reports read as the same gamepad state as USB, existing tests updated. - `README.md`: DualSense over Bluetooth. **Tested** - Windows 11 Pro 10.0.26200, RTX 4070 Ti, Rust 1.98.1, debug build - `cargo build --workspace` then `cargo test --workspace -- --test-threads=4`: all passed, 0 failed (lib: 1099 passed, 26 ignored) - SKIPPED: `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` (needs Developer Mode), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows) **Regression run** - not done (see Not tested) **Not tested** - No real DualSense or DualShock 4 over Bluetooth: the report layouts come from a reader I wrote for another project and are checked only by the unit tests with synthetic reports. - `scripts/smoke.ps1` on `main` vs this head was not run; the change only touches how a PlayStation pad's HID reports are decoded. - AMD GPUs. **AI use** - Claude Code with Claude Sonnet 5.5 wrote the code, tests and this description; I reviewed the diff.
A DualSense over Bluetooth was skipped because its reports are not the USB
ones. It sends the simple 0x01 layout until a title asks for calibration (we
never do) and the full 0x31 report after; a DualShock 4 can send the full
0x11 report. Report parsing is now one table keyed by pad and report id, with
unit tests that the Bluetooth reports read as the same gamepad state as USB.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:18:04 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 05:26 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 05:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/2081#issuecomment-7153782872) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2081/head:github-bot/gh-2081'
git switch 'github-bot/gh-2081'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2081'
git switch 'github-bot/gh-2081'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2081'
git switch 'github-bot/gh-2081'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2081'
git switch 'main'
git merge --squash 'github-bot/gh-2081'
git switch 'main'
git merge --ff-only 'github-bot/gh-2081'
git switch 'main'
git merge 'github-bot/gh-2081'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.