Skip to content

Cleanup Windows backend code a bit#305

Merged
Youw merged 3 commits intolibusb:masterfrom
DJm00n:winimpl-cleanup
Jul 16, 2021
Merged

Cleanup Windows backend code a bit#305
Youw merged 3 commits intolibusb:masterfrom
DJm00n:winimpl-cleanup

Conversation

@DJm00n
Copy link
Copy Markdown
Contributor

@DJm00n DJm00n commented Jul 13, 2021

Cleanup Windows backend code a bit before adding HID device connection callback code.

@mcuee mcuee added the Windows Related to Windows backend label Jul 14, 2021
@DJm00n
Copy link
Copy Markdown
Contributor Author

DJm00n commented Jul 14, 2021

@Youw could you please review this?

Copy link
Copy Markdown
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.

So now we open the device/handle 2 times during the enumeration.
I'd strongly suggest to cache/reuse the same handle, even if some of the sub-routines are in a separate function.

Comment thread windows/hid.c Outdated
Comment thread windows/hid.c Outdated
Comment thread windows/hid.c Outdated
@DJm00n DJm00n force-pushed the winimpl-cleanup branch from eea54af to 1530b73 Compare July 15, 2021 10:43
@DJm00n
Copy link
Copy Markdown
Contributor Author

DJm00n commented Jul 16, 2021

@Youw could you merge this?

@Youw Youw merged commit 2a24bf9 into libusb:master Jul 16, 2021
@DJm00n DJm00n deleted the winimpl-cleanup branch July 19, 2021 08:52
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.

3 participants