DualShock 4 and Switch Pro Controller read straight from HID, like th… #462
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!462
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-462"
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?
@Togicx on GitHub · 2026-11-27 22:55 UTC · original
Togicx:feat/dualshock4-switch-pro→main· +859 −63 · 6 files · 1 commits · open…e DualSense
PlayStation 4 pads (DualShock 4, both models, and Sony's wireless adapter) and the Nintendo Switch Pro Controller are now read over USB and Bluetooth without Steam Input or DS4Windows, through the DualSense's HID path: the same scan thread, a reader thread per pad, the same slots behind XInput and the same switch (VICTORY_DUALSENSE).
DualShock 4: its three button bytes are the DualSense's; only where the sticks, triggers and buttons sit differs (USB 0x01, Bluetooth 0x11 two bytes further in, the short Bluetooth 0x01). Full reports are asked for with feature report 0x02 over USB and 0x05 over Bluetooth. Its address, so a pad on cable and Bluetooth at once is opened once, comes from feature report 0x12 over USB and from the HID serial number Windows fills with it over Bluetooth.
Switch Pro Controller (gameinput/switch_pro.rs): over USB the handshake that makes it talk HID (0x80: status, handshake, high speed, handshake, HID only); then its address, the stick calibration in its flash (factory, user calibration where there is one), the first player light and full reports (0x30). A pad already open over Bluetooth is left alone before the USB handshake would take it from there. Face buttons by where they sit, as on an Xbox pad; VICTORY_SWITCH_LABELS=1 by their letters. ZL and ZR are buttons.
Tests with built reports for both pads, their addresses and the Switch calibration;
live_pads, an ignored test, prints what real pads read as without the game. README: a Controllers section.Tested on Windows 11 with a DualShock 4 (second model) and a Switch Pro Controller, each over USB and Bluetooth: live_pads (every button, sticks to +-1.0 with the calibration, analog triggers on the DualShock 4, cable plugged in while on Bluetooth opened once), and in the game, pads plugged and unplugged and switched within one session.
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.