From bd37ab44b8bf7a5d405271a7da20ac999968406d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 11 Mar 2024 22:36:55 +0100 Subject: Only update cursor position in window capture if recording cursor --- src/capture/xcomposite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/capture/xcomposite.c b/src/capture/xcomposite.c index ae7481b..15d560d 100644 --- a/src/capture/xcomposite.c +++ b/src/capture/xcomposite.c @@ -246,7 +246,8 @@ int gsr_capture_xcomposite_capture(gsr_capture_xcomposite *self, AVFrame *frame) const int target_y = max_int(0, frame->height / 2 - self->texture_size.y / 2); // TODO: Can we do this a better way than to call it every capture? - gsr_cursor_tick(&self->cursor, self->window); + if(self->params.record_cursor) + gsr_cursor_tick(&self->cursor, self->window); const vec2i cursor_pos = { target_x + self->cursor.position.x - self->cursor.hotspot.x, -- cgit v1.2.3