haimgel / display-switch

Turn a $30 USB switch into a full-featured multi-monitor KVM switch
https://haim.dev/posts/2020-07-28-dual-monitor-kvm/
MIT License
2.86k stars 112 forks source link

Fix rusb callbacks for macOS 12.4 #105

Closed rajohns08 closed 2 years ago

rajohns08 commented 2 years ago

Fixes #104

leodag commented 2 years ago

I'm on Linux, and was not getting any device connected/disconnected events. This fixed it. Thanks!

leodag commented 2 years ago

By the way, instead of doing unsafe impl Send for PnPDetectLibusb, the UsbCallback can be changed to be Send doing pub trait UsbCallback: Send

jabl commented 2 years ago

Now that I look at this one, it's very similar to my PR https://github.com/haimgel/display-switch/pull/111 that I just submitted a few hours ago, except I did made the UsbCallback Send as suggested above.

haimgel commented 2 years ago

@jabl I think #111 is a bit better, so closing this one since #111 is merged.