Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fmt

Richie McIlroyc10b5f3a03cd
diff --git a/apps/desktop/src-tauri/src/windows.rs b/apps/desktop/src-tauri/src/windows.rs
index e35f4f0dd..674c64049 100644
--- a/apps/desktop/src-tauri/src/windows.rs
+++ b/apps/desktop/src-tauri/src/windows.rs
@@ -1074,14 +1074,13 @@ impl ShowCapWindow {
ensure_camera_input_active(&mut app_state).await;
- if enable_native_camera_preview {
- if let Err(err) =
+ if enable_native_camera_preview
+ && let Err(err) =
init_native_camera_preview(&mut app_state, window.clone()).await
- {
- error!(
- "Error reinitializing camera preview for existing window: {err}"
- );
- }
+ {
+ error!(
+ "Error reinitializing camera preview for existing window: {err}"
+ );
}
drop(app_state);
@@ -2122,14 +2121,13 @@ impl ShowCapWindow {
}
}
- if enable_native_camera_preview {
- if let Err(err) =
+ if enable_native_camera_preview
+ && let Err(err) =
init_native_camera_preview(&mut state, window.clone()).await
- {
- error!(
- "Error initializing camera preview, falling back to WebSocket preview: {err}"
- );
- }
+ {
+ error!(
+ "Error initializing camera preview, falling back to WebSocket preview: {err}"
+ );
}
#[cfg(not(target_os = "macos"))]