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/kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/capture/kms.c') diff --git a/src/capture/kms.c b/src/capture/kms.c index 0b75b1f..16b20b7 100644 --- a/src/capture/kms.c +++ b/src/capture/kms.c @@ -193,7 +193,7 @@ static vec2i swap_vec2i(vec2i value) { return value; } -bool gsr_capture_kms_capture(gsr_capture_kms *self, AVFrame *frame, bool hdr, bool screen_plane_use_modifiers, bool cursor_texture_is_external) { +bool gsr_capture_kms_capture(gsr_capture_kms *self, AVFrame *frame, bool hdr, bool screen_plane_use_modifiers, bool cursor_texture_is_external, bool record_cursor) { //egl->glClearColor(0.0f, 0.0f, 0.0f, 1.0f); self->base.egl->glClear(0); @@ -300,7 +300,7 @@ bool gsr_capture_kms_capture(gsr_capture_kms *self, AVFrame *frame, bool hdr, bo capture_pos, self->capture_size, texture_rotation, false); - if(cursor_drm_fd) { + if(record_cursor && cursor_drm_fd) { const vec2i cursor_size = {cursor_drm_fd->width, cursor_drm_fd->height}; vec2i cursor_pos = {cursor_drm_fd->x, cursor_drm_fd->y}; switch(self->monitor_rotation) { -- cgit v1.2.3