1 Commits
Author SHA1 Message Date
Brandon King 6cfff2359f feat: impl From<StreamDeck> for AsyncStreamDeck
Allows opening a device via the synchronous API on a caller-chosen thread
and then handing it to the async wrapper. This matters on macOS, where
hidapi's IOHIDManager is bound to the run loop of the thread that created
the HidApi: enumerate/open must happen on that thread, but
AsyncStreamDeck::connect runs them via block_in_place on whatever tokio
worker is current, which can crash (EXC_BREAKPOINT in CoreFoundation)
when the device set changes, e.g. after sleep/wake.

With this, an application can own the HidApi on a dedicated thread, open
devices there with StreamDeck::connect, and still use the async API for
everything else.
2026-06-13 11:35:17 +01:00