diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-09-16 22:19:09 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-09-16 23:31:53 +0200 |
commit | 25b7b4e84e00c3fd008f3b94146a3051a35029f2 (patch) | |
tree | 5a20e1bdc9dcde5e497be371bf5808eb9c862d21 /src/main.cpp | |
parent | 4bcf976a71c3cb7660912b4e888a2197f81eb4b1 (diff) |
Pure vaapi capture (for capture target) and opengl composition for cursor only when capturing window and portal as well, clear background on resize for monitor capture
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index f2526f8..c0fa148 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3331,7 +3331,7 @@ int main(int argc, char **argv) { gsr_damage_on_event(&damage, gsr_egl_get_event_data(&egl)); } gsr_damage_tick(&damage); - gsr_capture_tick(capture, video_codec_context); + gsr_capture_tick(capture); if(!is_monitor_capture) { Window damage_target_window = 0; @@ -3349,10 +3349,12 @@ int main(int argc, char **argv) { } bool damaged = false; - if(capture->is_damaged) + if(use_damage_tracking) + damaged = gsr_damage_is_damaged(&damage); + else if(capture->is_damaged) damaged = capture->is_damaged(capture); else - damaged = !use_damage_tracking || gsr_damage_is_damaged(&damage); + damaged = true; if(damaged) ++damage_fps_counter; @@ -3410,7 +3412,6 @@ int main(int argc, char **argv) { } } - gsr_capture_capture_end(capture, video_frame); video_pts_counter += num_frames; } |