Skip to content

cmake: don't force enable/disable SDL_HIDAPI_LIBUSB #7754

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

Merged
merged 1 commit into from
May 28, 2023

Conversation

madebr
Copy link
Contributor

@madebr madebr commented May 28, 2023

Use CMakeDependentOption instead to configure SDL_HIDAPI_LIBUSB to a okay-ish variable.

Description

By not forcing the variable, it should be possible to disable SDL_HIDAPI_LIBUSB.

Existing Issue(s)

#7736

Use CMakeDependentOption instead to configure SDL_HIDAPI_LIBUSB to a okay-ish variable.
@madebr madebr merged commit 76a919d into libsdl-org:main May 28, 2023
@madebr madebr deleted the cmake-no-hidapi-force branch May 28, 2023 01:27
@@ -167,17 +167,17 @@ endif()
# so we default to yes on iOS.
# TODO: Windows can support libusb, the hid.c file just depends on Unix APIs
if((WINDOWS AND NOT WINDOWS_STORE) OR IOS OR TVOS OR ANDROID)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is NOT WINDOWS_STORE here is a product of copy & paste or do we really support UWP with libusb?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if libusb works on UWP, but our libusb support does work on Windows. I tested it this week.

Copy link
Contributor

Choose a reason for hiding this comment

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

This part of the cmake'ry needs revision, then. As for windows, is the native driver not good enough?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The Windows libusb is definitely quirky and if we change this, we shouldn't enable it by default. For example, sending some reports to a DualSense controller will hang for a full second - and it doesn't do that on any other hidapi backend.

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