Skip to content

nsyshid: Make Libusb the Windows backend - #1471

Merged
Exzap merged 2 commits into
cemu-project:mainfrom
deReeperJosh:windowslibusb
Jan 12, 2025
Merged

Exzap merged 2 commits into
cemu-project:mainfrom
deReeperJosh:windowslibusb

Conversation

@deReeperJosh

Copy link
Copy Markdown
Contributor

After doing some extensive testing, I am opening this PR to make Libusb the default backed across all platforms, including now Windows.

The motivations for this being, that other emulators also use Libusb as their default backend on all platforms, which on Windows requires the device to have libusb drivers installed. However, if users were jumping between emulators and playing games that required a usb peripheral, they would have to constantly uninstall and reinstall different drivers for their device.

Also, having one backend for all operating systems allows for any changes made to be applied to all OSs, which should make future updates to the nsyshid methods simpler.

Libusb on windows also fixes the Skylanders: Trap Team portal audio issues seen with Windows HID.

Updates to nsyshid methods and method parameters have been made based on updates to the WUT nyshid header file. Updates to the libusb backend (including the addition of set protocol and set idle) have been made based on the updates to the nsyshid parameters, and the information in section 7 of the HID 1.1 specifications

}
}

void export_HIDGetDescriptor(PPCInterpreter_t* hCPU)

@capitalistspz capitalistspz Jan 12, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to switch the functions to the newer HLE Interfaces

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's easy to accidentally introduce subtle regressions while reworking HLE interfaces so I think this should ideally be done as a separate PR anyway.

Comment thread src/Cafe/OS/libs/nsyshid/BackendLibusb.cpp Outdated
@Exzap

Exzap commented Jan 12, 2025

Copy link
Copy Markdown
Member

Looks good to me. Regarding switching a few instances from cemuLog_logDebug to cemuLog_log in the libusb backend, we can leave that in for a while if its helpful for troubleshooting, but generally systems should not write to log in public builds for anything that is within normal operation.

@deReeperJosh

Copy link
Copy Markdown
Contributor Author

I have restored the debug logs in the libusb backend - had changed them to normal logs while testing locally

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.

3 participants