mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Correctly combine damage tracking when using multiple sources
This commit is contained in:
@@ -111,10 +111,14 @@ These are the available options for capture sources:
|
||||
- The Y position in pixels. If the number ends with % and is a number between 0 and 100 then it's a position relative to the video size
|
||||
.IP \(bu 3
|
||||
.B width
|
||||
- The width in pixels. If the number ends with % and is a number between 0 and 100 then it's a size relative to the video size
|
||||
- The width in pixels. If the number ends with % and is a number between 0 and 100 then it's a size relative to the video size.
|
||||
|
||||
A value of 0 means to not scale the capture source and instead use the original width.
|
||||
.IP \(bu 3
|
||||
.B height
|
||||
- The height in pixels. If the number ends with % and is a number between 0 and 100 then it's a size relative to the video size
|
||||
|
||||
A value of 0 means to not scale the capture source and instead use the original height.
|
||||
.IP \(bu 3
|
||||
.B halign
|
||||
- The horizontal alignment, should be either
|
||||
|
||||
@@ -201,8 +201,6 @@ static void usage_header(void) {
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
// TODO: Add --list-v4l2-devices option
|
||||
|
||||
static void usage_full(void) {
|
||||
const bool inside_flatpak = getenv("FLATPAK_ID") != NULL;
|
||||
usage_header();
|
||||
|
||||
11
src/main.cpp
11
src/main.cpp
@@ -4270,6 +4270,9 @@ int main(int argc, char **argv) {
|
||||
should_stop_error = false;
|
||||
bool damaged = false;
|
||||
|
||||
if(use_damage_tracking)
|
||||
damaged = gsr_damage_is_damaged(&damage);
|
||||
|
||||
for(VideoSource &video_source : video_sources) {
|
||||
gsr_capture_tick(video_source.capture);
|
||||
|
||||
@@ -4291,11 +4294,9 @@ int main(int argc, char **argv) {
|
||||
video_source.capture_source->window_id = damage_target_window;
|
||||
}
|
||||
|
||||
if(use_damage_tracking)
|
||||
damaged = gsr_damage_is_damaged(&damage);
|
||||
else if(video_source.capture->is_damaged)
|
||||
damaged = video_source.capture->is_damaged(video_source.capture);
|
||||
else
|
||||
if(video_source.capture->is_damaged)
|
||||
damaged |= video_source.capture->is_damaged(video_source.capture);
|
||||
else if(!use_damage_tracking)
|
||||
damaged = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user