fix(audio,windows): init_tx is SyncSender not Sender (windows-only build fix)

run_raw_input_loop / run_hook_loop signatures used Sender<bool>
but the callers create the channel via sync_channel which returns
SyncSender. Linux cross-check missed this because windows.rs is
behind #[cfg(target_os = "windows")].
This commit is contained in:
EdisonJwa
2026-05-16 01:55:31 +08:00
parent 181b3368d4
commit 606d594dc9
@@ -370,7 +370,7 @@ impl Drop for WindowsRawInputBackend {
/// # Safety
/// Calls into Win32 directly. Must be invoked on the thread that
/// owns the message window (created here).
unsafe fn run_raw_input_loop(init_tx: std::sync::mpsc::Sender<bool>) -> bool {
unsafe fn run_raw_input_loop(init_tx: std::sync::mpsc::SyncSender<bool>) -> bool {
// Helper that signals the readiness state to the main thread.
// We send exactly once at the first decisive moment (either an
// early-fail return or right after a successful
@@ -795,7 +795,7 @@ impl Drop for WindowsHookBackend {
/// # Safety
/// Calls Win32 directly; must run on the thread that owns the
/// hook handles.
unsafe fn run_hook_loop(init_tx: std::sync::mpsc::Sender<bool>) -> bool {
unsafe fn run_hook_loop(init_tx: std::sync::mpsc::SyncSender<bool>) -> bool {
let mut signal = Some(init_tx);
macro_rules! report {
($v:expr) => {