diff --git a/client/Cargo.toml b/client/Cargo.toml index f78576f..2cc2431 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -4,7 +4,7 @@ path = "src/main.rs" [package] name = "lesavka_client" -version = "0.11.10" +version = "0.11.11" edition = "2024" [dependencies] diff --git a/client/src/launcher/ui.rs b/client/src/launcher/ui.rs index 3faecd5..5d58922 100644 --- a/client/src/launcher/ui.rs +++ b/client/src/launcher/ui.rs @@ -460,6 +460,30 @@ fn rebind_popout_preview( } } +#[cfg(not(coverage))] +fn sync_preview_profiles( + preview: &super::preview::LauncherPreview, + widgets: &super::ui_components::LauncherWidgets, + popouts: &Rc; 2]>>, + state: &LauncherState, +) { + for monitor_id in 0..2 { + let capture = state.capture_size_choice(monitor_id); + let breakout = state.breakout_size_choice(monitor_id); + preview.set_capture_profile( + monitor_id, + capture.width, + capture.height, + capture.fps, + capture.max_bitrate_kbit, + capture.preset != CaptureSizePreset::Source, + ); + preview.set_breakout_profile(monitor_id, breakout.width, breakout.height); + rebind_inline_preview(preview, widgets, monitor_id); + rebind_popout_preview(preview, popouts, monitor_id); + } +} + #[cfg(not(coverage))] fn disconnected_capture_note(mode: &str) -> &'static str { match mode { @@ -644,6 +668,7 @@ pub fn run_gui_launcher(server_addr: String) -> Result<()> { if let Some(preview) = preview.as_ref() { preview.set_log_sink(log_tx.clone()); + sync_preview_profiles(preview, &widgets, &popouts, &state.borrow()); } { @@ -1807,27 +1832,7 @@ pub fn run_gui_launcher(server_addr: String) -> Result<()> { state.set_preview_source_profile(width, height, fps); } if rebind_preview && let Some(preview) = preview.as_ref() { - for monitor_id in 0..2 { - let capture = - state.borrow().capture_size_choice(monitor_id); - let breakout = - state.borrow().breakout_size_choice(monitor_id); - preview.set_capture_profile( - monitor_id, - capture.width, - capture.height, - capture.fps, - capture.max_bitrate_kbit, - capture.preset != CaptureSizePreset::Source, - ); - preview.set_breakout_profile( - monitor_id, - breakout.width, - breakout.height, - ); - rebind_inline_preview(preview, &widgets, monitor_id); - rebind_popout_preview(preview, &popouts, monitor_id); - } + sync_preview_profiles(preview, &widgets, &popouts, &state.borrow()); } refresh_eye_feed_controls(&widgets, &state.borrow()); } else { diff --git a/common/Cargo.toml b/common/Cargo.toml index 9b45a12..64029ec 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lesavka_common" -version = "0.11.10" +version = "0.11.11" edition = "2024" build = "build.rs" diff --git a/common/src/cli.rs b/common/src/cli.rs index fa6cc51..73ea571 100644 --- a/common/src/cli.rs +++ b/common/src/cli.rs @@ -17,6 +17,6 @@ mod tests { #[test] fn banner_includes_version() { - assert_eq!(banner("0.11.10"), "lesavka-common CLI (v0.11.10)"); + assert_eq!(banner("0.11.11"), "lesavka-common CLI (v0.11.11)"); } } diff --git a/server/Cargo.toml b/server/Cargo.toml index 5a0b476..b4bdadc 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -10,7 +10,7 @@ bench = false [package] name = "lesavka_server" -version = "0.11.10" +version = "0.11.11" edition = "2024" autobins = false