Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nsyshid: Make Libusb the Windows backend #1471

Merged
merged 2 commits into from
Jan 12, 2025

Conversation

deReeperJosh
Copy link
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

0);
}
}

void export_HIDGetDescriptor(PPCInterpreter_t* hCPU)
Copy link
Contributor

@capitalistspz capitalistspz Jan 12, 2025

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
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.

@Exzap
Copy link
Member

Exzap commented Jan 12, 2025

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
Contributor Author

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

@Exzap Exzap merged commit 0a59085 into cemu-project:main Jan 12, 2025
5 checks passed
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