Properly update replay recording status in ui when showing/hiding ui

This commit is contained in:
dec05eba
2025-04-26 14:28:25 +02:00
parent 5a17aae0ab
commit 5a32c469d3
3 changed files with 12 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
project('gsr-ui', ['c', 'cpp'], version : '1.5.0', default_options : ['warning_level=2', 'cpp_std=c++17'], subproject_dir : 'depends')
project('gsr-ui', ['c', 'cpp'], version : '1.5.1', default_options : ['warning_level=2', 'cpp_std=c++17'], subproject_dir : 'depends')
if get_option('buildtype') == 'debug'
add_project_arguments('-g3', language : ['c', 'cpp'])

View File

@@ -1,7 +1,7 @@
[package]
name = "gsr-ui"
type = "executable"
version = "1.5.0"
version = "1.5.1"
platforms = ["posix"]
[lang.cpp]

View File

@@ -1028,6 +1028,9 @@ namespace gsr {
if(paused)
update_ui_recording_paused();
if(replay_recording)
update_ui_recording_started();
// Wayland compositors have retarded fullscreen animations that we cant disable in a proper way
// without messing up window position.
show_overlay_timeout_seconds = prevent_game_minimizing ? 0.0 : 0.15;
@@ -1620,9 +1623,9 @@ namespace gsr {
return;
if(is_capture_target_monitor(recording_capture_target.c_str()))
snprintf(msg, sizeof(msg), "Saved a recording of this monitor to %s", focused_window_name.c_str());
snprintf(msg, sizeof(msg), "Saved a recording of this monitor to \"%s\"", focused_window_name.c_str());
else
snprintf(msg, sizeof(msg), "Saved a recording of %s to '%s'", recording_capture_target.c_str(), focused_window_name.c_str());
snprintf(msg, sizeof(msg), "Saved a recording of %s to \"%s\"", recording_capture_target.c_str(), focused_window_name.c_str());
capture_target = recording_capture_target.c_str();
break;
@@ -1638,9 +1641,9 @@ namespace gsr {
snprintf(duration, sizeof(duration), " ");
if(is_capture_target_monitor(recording_capture_target.c_str()))
snprintf(msg, sizeof(msg), "Saved a%sreplay of this monitor to %s", duration, focused_window_name.c_str());
snprintf(msg, sizeof(msg), "Saved a%sreplay of this monitor to \"%s\"", duration, focused_window_name.c_str());
else
snprintf(msg, sizeof(msg), "Saved a%sreplay of %s to '%s'", duration, recording_capture_target.c_str(), focused_window_name.c_str());
snprintf(msg, sizeof(msg), "Saved a%sreplay of %s to \"%s\"", duration, recording_capture_target.c_str(), focused_window_name.c_str());
capture_target = recording_capture_target.c_str();
break;
@@ -1650,9 +1653,9 @@ namespace gsr {
return;
if(is_capture_target_monitor(screenshot_capture_target.c_str()))
snprintf(msg, sizeof(msg), "Saved a screenshot of this monitor to %s", focused_window_name.c_str());
snprintf(msg, sizeof(msg), "Saved a screenshot of this monitor to \"%s\"", focused_window_name.c_str());
else
snprintf(msg, sizeof(msg), "Saved a screenshot of %s to %s", screenshot_capture_target.c_str(), focused_window_name.c_str());
snprintf(msg, sizeof(msg), "Saved a screenshot of %s to \"%s\"", screenshot_capture_target.c_str(), focused_window_name.c_str());
capture_target = screenshot_capture_target.c_str();
break;
@@ -1968,6 +1971,7 @@ namespace gsr {
record_dropdown_button_ptr->set_item_icon("pause", &get_theme().pause_texture);
record_dropdown_button_ptr->set_item_enabled("pause", false);
paused = false;
replay_recording = false;
}
void Overlay::update_ui_streaming_started() {