Windows port Phase 2: cpal device enumeration #4

Open
mollusk wants to merge 15 commits from windows-port-phase2 into windows-port-phase1
Showing only changes of commit 4d07e03395 - Show all commits
+9
View File
@@ -1816,6 +1816,14 @@ async fn run_core_loop(
} }
CoreCommand::SetNetworkMode(mode) => { CoreCommand::SetNetworkMode(mode) => {
// Skip when the posture is unchanged. The GUI re-sends the saved
// network mode as part of its startup config-sync, and that mode
// usually already matches the freshly-built stack — rebuilding the
// iroh endpoint for an identical posture just churns the network
// and adds a needless ~1s teardown+rebuild bounce at every launch
// (seen on both Linux and Windows/Wine). A real change still
// rebuilds exactly as before.
if mode != network_mode {
network_mode = mode; network_mode = mode;
// Rebuild the persistent stack to the new posture immediately if // Rebuild the persistent stack to the new posture immediately if
// idle; if a call is active, defer to the next Leave/Join so the // idle; if a call is active, defer to the next Leave/Join so the
@@ -1829,6 +1837,7 @@ async fn run_core_loop(
net_rebuild_pending = true; net_rebuild_pending = true;
} }
} }
}
CoreCommand::RegenerateIdentity => { CoreCommand::RegenerateIdentity => {
// Mint + persist a fresh identity, discarding the old one. The // Mint + persist a fresh identity, discarding the old one. The