aboutsummaryrefslogtreecommitdiff
path: root/src/capture/xcomposite.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-03-11 22:36:55 +0100
committerdec05eba <dec05eba@protonmail.com>2024-03-11 22:36:55 +0100
commitbd37ab44b8bf7a5d405271a7da20ac999968406d (patch)
tree1398cac9821d1a2501cdb5614c0cd686f9f5213e /src/capture/xcomposite.c
parentba096a3ba7815eff41159eedfb646c97451fbef7 (diff)
Only update cursor position in window capture if recording cursor
Diffstat (limited to 'src/capture/xcomposite.c')
-rw-r--r--src/capture/xcomposite.c3
1 files changed, 2 insertions, 1 deletions
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,