@@ -24,6 +24,7 @@ mod posthog;
2424mod presets;
2525mod recording;
2626mod recording_settings;
27+ mod recovery;
2728mod screenshot_editor;
2829mod target_select_overlay;
2930mod thumbnails;
@@ -2164,7 +2165,7 @@ async fn editor_delete_project(
21642165#[ specta:: specta]
21652166#[ instrument( skip( app) ) ]
21662167async fn show_window ( app : AppHandle , window : ShowCapWindow ) -> Result < ( ) , String > {
2167- let _ = window. show ( & app) . await ;
2168+ window. show ( & app) . await . map_err ( |e| e . to_string ( ) ) ? ;
21682169 Ok ( ( ) )
21692170}
21702171
@@ -2403,6 +2404,9 @@ pub async fn run(recording_logging_handle: LoggingHandle, logs_dir: PathBuf) {
24032404 target_select_overlay:: focus_window,
24042405 editor_delete_project,
24052406 format_project_name,
2407+ recovery:: find_incomplete_recordings,
2408+ recovery:: recover_recording,
2409+ recovery:: discard_incomplete_recording,
24062410 ] )
24072411 . events ( tauri_specta:: collect_events![
24082412 RecordingOptionsChanged ,
@@ -2803,8 +2807,8 @@ pub async fn run(recording_logging_handle: LoggingHandle, logs_dir: PathBuf) {
28032807 tokio:: spawn ( EditorInstances :: remove ( window. clone ( ) ) ) ;
28042808
28052809 #[ cfg( target_os = "windows" ) ]
2806- if CapWindowId :: Settings . get ( & app) . is_none ( ) {
2807- reopen_main_window ( & app) ;
2810+ if CapWindowId :: Settings . get ( app) . is_none ( ) {
2811+ reopen_main_window ( app) ;
28082812 }
28092813 }
28102814 CapWindowId :: ScreenshotEditor { id } => {
@@ -2815,8 +2819,8 @@ pub async fn run(recording_logging_handle: LoggingHandle, logs_dir: PathBuf) {
28152819 tokio:: spawn ( ScreenshotEditorInstances :: remove ( window. clone ( ) ) ) ;
28162820
28172821 #[ cfg( target_os = "windows" ) ]
2818- if CapWindowId :: Settings . get ( & app) . is_none ( ) {
2819- reopen_main_window ( & app) ;
2822+ if CapWindowId :: Settings . get ( app) . is_none ( ) {
2823+ reopen_main_window ( app) ;
28202824 }
28212825 }
28222826 CapWindowId :: Settings => {
@@ -2834,8 +2838,8 @@ pub async fn run(recording_logging_handle: LoggingHandle, logs_dir: PathBuf) {
28342838 }
28352839
28362840 #[ cfg( target_os = "windows" ) ]
2837- if !has_open_editor_window ( & app) {
2838- reopen_main_window ( & app) ;
2841+ if !has_open_editor_window ( app) {
2842+ reopen_main_window ( app) ;
28392843 }
28402844
28412845 return ;
@@ -3122,6 +3126,11 @@ async fn create_editor_instance_impl(
31223126 RenderFrameEvent :: listen_any ( & app, {
31233127 let preview_tx = instance. preview_tx . clone ( ) ;
31243128 move |e| {
3129+ tracing:: debug!(
3130+ frame = e. payload. frame_number,
3131+ fps = e. payload. fps,
3132+ "RenderFrameEvent received"
3133+ ) ;
31253134 preview_tx. send_modify ( |v| {
31263135 * v = Some ( (
31273136 e. payload . frame_number ,
0 commit comments