Skip to content

Feat/ds4 support - #2

Closed
osilayer8 wants to merge 3 commits into
BallerIsLeet:mainfrom
osilayer8:feat/ds4-support
Closed

osilayer8 wants to merge 3 commits into
BallerIsLeet:mainfrom
osilayer8:feat/ds4-support

Conversation

@osilayer8

Copy link
Copy Markdown

No description provided.

osilayer8 and others added 3 commits November 3, 2026 21:34
Over USB a DualShock 4 streams 64-byte input report 0x01 and needs no
handshake, so the driver only unpacks the d-pad hat: sticks and triggers
already arrive in PlayStation convention. Both consumer ids (054c:05c4
and 054c:09cc) register and share one parser.

Also fixes three ways a controller could silently stop working:
- virtual pads left behind by a killed payload are recorded in a ledger
  under /data and removed by the next run, instead of lingering as
  phantom DualSenses that hold a controller slot until reboot;
- a pad whose inserts start failing is rebuilt on the same slot, with a
  backoff, instead of staying dead until the payload is re-sent;
- a failed USB endpoint probe is retried after a second rather than
  blacklisting the device for as long as its /dev node exists.

Grace also drops a slot that has no virtual pad, so a resume can never
dereference a NULL pad.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
main.c reaps the stale-pad ledger after taking over a previous instance,
rebuilds a virtual pad whose inserts start failing, and drops a slot with
no virtual pad instead of entering grace with nothing to hold — which
previously could dereference a NULL pad on resume.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
usb.c now separates permanent rejections (a device no driver supports)
from transient probe failures, so a controller whose interrupt endpoint
is not published yet is retried after a second instead of being hidden
for as long as its /dev node exists. README lists the DualShock 4.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@osilayer8 osilayer8 closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant