Skip to content

Conversation

@toxieainc
Copy link
Contributor

also make it work for older WINVER cases by copying a few defines

this is how we intend/want to use it within https://github.com/vpinball/vpinball, so would be nice to have that in the official repo

also make it work for older WINVER cases by copying a few defines
Copy link
Member

@Youw Youw left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

Would you be willing to add a simple compilation check for this to our CI script?

@toxieainc
Copy link
Contributor Author

Willing: Yes. Capable: No. ;)

@Youw Youw merged commit c5ee4d3 into libusb:master Feb 25, 2025
10 of 12 checks passed
@Youw
Copy link
Member

Youw commented Feb 25, 2025

Maybe later then

@mcuee mcuee added the Windows Related to Windows backend label Feb 26, 2025
coll_bit_range[collection_node_idx] = (rd_bit_range ***)malloc(256 * sizeof(*coll_bit_range[0])); // 256 possible report IDs (incl. 0x00)
for (int reportid_idx = 0; reportid_idx < 256; reportid_idx++) {
coll_bit_range[collection_node_idx][reportid_idx] = malloc(NUM_OF_HIDP_REPORT_TYPES * sizeof(*coll_bit_range[0][0]));
for (HIDP_REPORT_TYPE rt_idx = 0; rt_idx < NUM_OF_HIDP_REPORT_TYPES; rt_idx++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Replacing the explicit enum type HIDP_REPORT_TYPE by int feels not like an improvement to me.

Copy link
Member

Choose a reason for hiding this comment

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

I believe this PR is to make the compiler happy with some of the strict checks.
And enums has never been intended to be used as iteration indexes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Windows Related to Windows backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants