FS#75827 - [sdl2] Enable SDL_HIDAPI_LIBUSB in package

Attached to Project: Arch Linux
Opened by JyKin (JyKin) - Tuesday, 06 September 2022, 16:03 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Saturday, 10 September 2022, 23:43 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Latest sdl2 package (2.24.0-1) is compiled using old flags. HIDAPI flags have changed and the use of libusb depends on the cmake flag SDL_HIDAPI_LIBUSB.
This flag is off by default, and its value is only forced (off or on) on some systems like Windows or FreeBSD.
Without it, controllers like gamecube controller (using the usb adptater) are not correctly recognized (could not use it in retroarch with sdl2 arch packages, setting the flag was enough).
Since it is manageable with compilation option, I don't know if I should report it to upstream.

Additional info:
* package version(s) : 2.24.0-1
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Saturday, 10 September 2022, 23:43 GMT
Reason for closing:  Fixed
Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 07 September 2022, 08:05 GMT
Are you sure the flag actually works for you? When I set it, I get this in the output:
-- SDL_HIDAPI_LIBUSB (Wanted: ON): OFF

Do I have to set anything else?
Comment by JyKin (JyKin) - Wednesday, 07 September 2022, 16:59 GMT
I checked my build log and I also get this in the output, that's strange.
What I am sure of is that without asking this option, the configuration step do not look for libusb; and that the package I made with the option allows me to use my gamecube controller in retroarch.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 10 September 2022, 04:19 GMT
Alright well it doesn't appear to be harmful at any rate. I stuck a package with SDL_HIDAPI_LIBUSB=ON into [testing]. Care you give it a spin? I'm still not convinced this option actually currently does anything given the output. This should be clarified with upstream.
Comment by JyKin (JyKin) - Saturday, 10 September 2022, 07:36 GMT
I tried the testing package and it works, I can use my gamecube controller in retroarch.
As for the cmake output, I checked more and the reporting use secondary variables but none are set for SDL_HIDAPI_LIBUSB. So it will always show it as OFF even when enabled.
I'm reporting this upstream.
Comment by JyKin (JyKin) - Saturday, 10 September 2022, 14:07 GMT
It really was only a printing issue, fixed in main branch now (https://github.com/libsdl-org/SDL/issues/6207).
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 10 September 2022, 23:43 GMT
Cool, great of you to follow up with upstream on this and that they fixed this so quickly.

Loading...