mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 15:56:00 +03:00
[PR #2271] [MERGED] usbd: Implement libusb passthrough #2615
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#2615
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/2271
Author: @deReeperJosh
Created: 1/29/2025
Status: ✅ Merged
Merged: 3/31/2025
Merged by: @georgemoralis
Base:
main← Head:usbd-libusb📝 Commits (8)
c3e4db9usbd: Implement libusb passthrough5310a1aclang-formata8e864bonly do kernel activities on non-windows1485f85use variable to represent "fake" windows kernel driverb3feadaMerge branch 'main' into usbd-libusb8190657Merge branch 'main' into usbd-libusbf02405eMerge branch 'main' into usbd-libusbd583ec6Merge branch 'main' into usbd-libusb📊 Changes
6 files changed (+475 additions, -247 deletions)
View changed files
📝
.gitmodules(+3 -0)📝
CMakeLists.txt(+2 -1)📝
externals/CMakeLists.txt(+5 -0)➕
externals/libusb(+1 -0)📝
src/core/libraries/usbd/usbd.cpp(+328 -184)📝
src/core/libraries/usbd/usbd.h(+136 -62)📄 Description
Re-opening pull request that I had previously opened on accident to implement libusb passthrough for the USBD library.
It appears that the free bsd build that orbis os is based off of used libusb for it's usb transactions (seen here), so we can use libusb as a submodule, and pass on all functions and parameters directly to libusb.
I can't take full credit for this code, many thanks go to Osyotr in the discord server who posted this code stub, I just needed to add the submodule.
The only major differences from the linked code stub are that I return the return value from libusb if the return code is > 0 (for methods where a return value > 0 is expected), and in the sceUsbdClaimInterface method, I check to see if a kernel driver is active before claiming the interface (required on linux and macos before performing device transactions)
I have tested this as working for Skylanders Trap Team, Skylanders Superchargers and Skylanders Imaginators on MacOS - would like some help testing more usb passthrough games (Lego Dimensions or Disney Infinity) as well as any users on Windows/Linux. Just an FYI that users on Windows will need to install winUSB as a driver for their chosen passthrough device, which can be done using Zadig
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.