Allow 'sync to content' framerate mode option on wayland (only desktop portal)

This commit is contained in:
dec05eba
2025-09-06 01:58:28 +02:00
parent b4e003c8f7
commit 4e62d12e8c
3 changed files with 6 additions and 14 deletions

2
TODO
View File

@@ -211,5 +211,3 @@ Make it possible to change replay duration of the "save 1 min" and "save 10 min"
If replay duration is set below the "save 1 min" or "save 10 min" then gray them out and when hovering over those buttons
show a tooltip that says that those buttons cant be used because the replay duration in replay settings is set to a lower value than that (and display the replay duration there).
Add content framerate mode for wayland with desktop portal capture when it has been added to gpu-screen-recorder and if it works.

View File

@@ -2561,13 +2561,10 @@ namespace gsr {
}
static std::string get_framerate_mode_validate(const RecordOptions &record_options, const GsrInfo &gsr_info) {
(void)gsr_info;
std::string framerate_mode = record_options.framerate_mode;
if(framerate_mode == "auto") {
if(framerate_mode == "auto")
framerate_mode = "vfr";
} else if(framerate_mode == "content") {
if(gsr_info.system_info.display_server != DisplayServer::X11)
framerate_mode = "vfr";
}
return framerate_mode;
}

View File

@@ -568,13 +568,10 @@ namespace gsr {
framerate_mode_box->add_item("Auto (Recommended)", "auto");
framerate_mode_box->add_item("Constant", "cfr");
framerate_mode_box->add_item("Variable", "vfr");
if(gsr_info->system_info.display_server == DisplayServer::X11) {
if(gsr_info->system_info.display_server == DisplayServer::X11)
framerate_mode_box->add_item("Sync to content", "content");
framerate_mode_box->set_item_enabled("content", true);
} else {
framerate_mode_box->add_item("Sync to content (X11 only)", "content");
framerate_mode_box->set_item_enabled("content", false);
}
else
framerate_mode_box->add_item("Sync to content (Only X11 or desktop portal capture)", "content");
framerate_mode_box_ptr = framerate_mode_box.get();
return framerate_mode_box;
}