aboutsummaryrefslogtreecommitdiff
path: root/src/Overlay.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-10-27 01:52:22 +0200
committerdec05eba <dec05eba@protonmail.com>2024-10-27 01:54:37 +0200
commitcfcee1a5d8e5068cdc5171b01beb9f9e6251e51e (patch)
treed2237ae86f9c41bb74ae05be25f5209857e1a132 /src/Overlay.cpp
parent1d2fc77cfcd3d40c3a382d3f5f8e6c28e8b38da9 (diff)
Add option to change video resolution
Diffstat (limited to 'src/Overlay.cpp')
-rw-r--r--src/Overlay.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index 204ff6f..c0acad4 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -704,9 +704,13 @@ namespace gsr {
const std::string output_file = config->record_config.save_directory + "/Video_" + get_date_str() + "." + container_to_file_extension(config->record_config.container.c_str());
const std::string audio_tracks_merged = merge_audio_tracks(config->record_config.record_options.audio_tracks);
const std::string framerate_mode = config->record_config.record_options.framerate_mode == "auto" ? "vfr" : config->record_config.record_options.framerate_mode;
+
char region[64];
snprintf(region, sizeof(region), "%dx%d", (int)config->record_config.record_options.record_area_width, (int)config->record_config.record_options.record_area_height);
+ if(config->record_config.record_options.record_area_option != "focused" && config->record_config.record_options.change_video_resolution)
+ snprintf(region, sizeof(region), "%dx%d", (int)config->record_config.record_options.video_width, (int)config->record_config.record_options.video_height);
+
std::vector<const char*> args = {
"gpu-screen-recorder", "-w", config->record_config.record_options.record_area_option.c_str(),
"-c", config->record_config.container.c_str(),
@@ -729,7 +733,7 @@ namespace gsr {
args.push_back(config->record_config.record_options.video_quality.c_str());
}
- if(config->record_config.record_options.record_area_option == "window" || config->record_config.record_options.record_area_option == "focused") {
+ if(config->record_config.record_options.record_area_option == "focused" || config->record_config.record_options.change_video_resolution) {
args.push_back("-s");
args.push_back(region);
}