mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-03-31 09:17:04 +09:00
m
This commit is contained in:
@@ -80,6 +80,7 @@ namespace gsr {
|
||||
|
||||
void update_notification_process_status();
|
||||
void save_video_in_current_game_directory(const char *video_filepath, NotificationType notification_type);
|
||||
void on_replay_saved(const char *replay_saved_filepath);
|
||||
void update_gsr_replay_save();
|
||||
void update_gsr_process_status();
|
||||
|
||||
|
||||
@@ -1484,6 +1484,16 @@ namespace gsr {
|
||||
show_notification(text.c_str(), 3.0, mgl::Color(255, 255, 255), get_color_theme().tint_color, notification_type);
|
||||
}
|
||||
|
||||
void Overlay::on_replay_saved(const char *replay_saved_filepath) {
|
||||
replay_save_show_notification = false;
|
||||
if(config.replay_config.save_video_in_game_folder) {
|
||||
save_video_in_current_game_directory(replay_saved_filepath, NotificationType::REPLAY);
|
||||
} else {
|
||||
const std::string text = "Saved replay to '" + filepath_get_filename(replay_saved_filepath) + "'";
|
||||
show_notification(text.c_str(), 3.0, mgl::Color(255, 255, 255), get_color_theme().tint_color, NotificationType::REPLAY);
|
||||
}
|
||||
}
|
||||
|
||||
void Overlay::update_gsr_replay_save() {
|
||||
if(replay_save_show_notification && replay_save_clock.get_elapsed_time_seconds() >= replay_saving_notification_timeout_seconds) {
|
||||
replay_save_show_notification = false;
|
||||
@@ -1500,12 +1510,7 @@ namespace gsr {
|
||||
if(replay_saved_filepath[line_len - 1] == '\n')
|
||||
replay_saved_filepath[line_len - 1] = '\0';
|
||||
|
||||
if(config.replay_config.save_video_in_game_folder) {
|
||||
save_video_in_current_game_directory(replay_saved_filepath, NotificationType::REPLAY);
|
||||
} else {
|
||||
const std::string text = "Saved replay to '" + filepath_get_filename(replay_saved_filepath) + "'";
|
||||
show_notification(text.c_str(), 3.0, mgl::Color(255, 255, 255), get_color_theme().tint_color, NotificationType::REPLAY);
|
||||
}
|
||||
on_replay_saved(replay_saved_filepath);
|
||||
} else if(gpu_screen_recorder_process_output_fd > 0) {
|
||||
char buffer[1024];
|
||||
read(gpu_screen_recorder_process_output_fd, buffer, sizeof(buffer));
|
||||
|
||||
Reference in New Issue
Block a user