Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(desktop): use operation lock when showing camera in recording

Richie McIlroy35015469d2d7
diff --git a/apps/desktop/src-tauri/src/recording.rs b/apps/desktop/src-tauri/src/recording.rs
index 90bab2f8a..fbfda8409 100644
--- a/apps/desktop/src-tauri/src/recording.rs
+++ b/apps/desktop/src-tauri/src/recording.rs
@@ -55,8 +55,8 @@ use crate::general_settings;
use crate::permissions;
use crate::web_api::AuthedApiError;
use crate::{
- App, CurrentRecordingChanged, FinalizingRecordings, MutableState, NewStudioRecordingAdded,
- RecordingStarted, RecordingState, RecordingStopped, VideoUploadInfo,
+ App, CameraWindowOperationLock, CurrentRecordingChanged, FinalizingRecordings, MutableState,
+ NewStudioRecordingAdded, RecordingStarted, RecordingState, RecordingStopped, VideoUploadInfo,
api::PresignedS3PutRequestMethod,
audio::AppSounds,
auth::AuthStore,
@@ -576,6 +576,8 @@ pub async fn start_recording(
}
}
+ let operation_lock = app.state::<CameraWindowOperationLock>();
+ let _operation_guard = operation_lock.lock().await;
ShowCapWindow::Camera { centered: true }
.show(&app)
.await