From cc211130132a21c2e86ada63ea13cddcbe550ddb Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 31 May 2024 16:42:25 +0200 Subject: Recording should be notified as successful if the recorded window is closed (set process id to -1 when exited) --- TODO | 3 +-- src/main.cpp | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 7cb992d..0281af5 100644 --- a/TODO +++ b/TODO @@ -20,5 +20,4 @@ Add option to start replay on system startup (use the gpu screen recorder system Disable the gpu screen recorders aur/source package systemd service if enabled in the gui since these are two different services. Or make that service and gui service the same and work with the same (gui) config file. The program should minimize to taskbar on minimize. Remove the need to install gpu screen recorder flatpak as system. This can now be done because of kms-server-proxy. - - +Implement profiles to quickly switch between settings. \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index e8e35b9..934d62c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1506,6 +1506,7 @@ static bool kill_gpu_screen_recorder_get_result() { } else { exit_success = WIFEXITED(status) && WEXITSTATUS(status) == 0; } + gpu_screen_recorder_process = -1; } return exit_success; } @@ -1550,7 +1551,6 @@ static gboolean on_start_replay_button_click(GtkButton *button, gpointer userdat gtk_button_set_label(button, "Start replay"); replaying = false; - gpu_screen_recorder_process = -1; gtk_widget_set_sensitive(GTK_WIDGET(replay_back_button), true); gtk_widget_set_sensitive(GTK_WIDGET(replay_save_button), false); @@ -1691,7 +1691,6 @@ static gboolean on_start_recording_button_click(GtkButton *button, gpointer user gtk_button_set_label(button, "Start recording"); recording = false; - gpu_screen_recorder_process = -1; gtk_widget_set_sensitive(GTK_WIDGET(record_back_button), true); paused = false; @@ -1817,7 +1816,6 @@ static gboolean on_start_streaming_button_click(GtkButton *button, gpointer user gtk_button_set_label(button, "Start streaming"); streaming = false; - gpu_screen_recorder_process = -1; gtk_widget_set_sensitive(GTK_WIDGET(stream_back_button), true); gtk_widget_set_opacity(GTK_WIDGET(streaming_bottom_panel_grid), 0.5); @@ -3047,6 +3045,7 @@ static void handle_child_process_death(gpointer userdata) { if(waitpid(gpu_screen_recorder_process, &status, WNOHANG) == 0) return; + gpu_screen_recorder_process = -1; prev_exit_status = -1; if(WIFEXITED(status)) prev_exit_status = WEXITSTATUS(status); -- cgit v1.2.3