From ba096a3ba7815eff41159eedfb646c97451fbef7 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 11 Mar 2024 19:01:46 +0100 Subject: Add -cursor option to not record cursor --- src/capture/xcomposite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/capture/xcomposite.c') diff --git a/src/capture/xcomposite.c b/src/capture/xcomposite.c index f1d620c..ae7481b 100644 --- a/src/capture/xcomposite.c +++ b/src/capture/xcomposite.c @@ -275,7 +275,7 @@ int gsr_capture_xcomposite_capture(gsr_capture_xcomposite *self, AVFrame *frame) will not get overdrawn the next frame causing a cursor trail to be visible since we dont clear the background. To fix this we detect if the cursor is partially inside the window and clear the background only in that case. */ - if(!cursor_completely_inside_window && cursor_inside_window) + if(!cursor_completely_inside_window && cursor_inside_window && self->params.record_cursor) self->clear_next_frame = true; gsr_color_conversion_draw(&self->base.color_conversion, window_texture_get_opengl_texture_id(&self->window_texture), @@ -283,7 +283,7 @@ int gsr_capture_xcomposite_capture(gsr_capture_xcomposite *self, AVFrame *frame) (vec2i){0, 0}, self->texture_size, 0.0f, false); - if(cursor_inside_window) { + if(cursor_inside_window && self->params.record_cursor) { gsr_color_conversion_draw(&self->base.color_conversion, self->cursor.texture_id, cursor_pos, self->cursor.size, (vec2i){0, 0}, self->cursor.size, -- cgit v1.2.3