diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-10-26 23:55:41 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-10-26 23:55:41 +0200 |
commit | 07ce3742019c3aa4599649bce4dffc1e9013ddff (patch) | |
tree | 28cb0673f242de41b7d50e2260a1f2866d279dcf | |
parent | 112640282d236587dff0fd09e5137bfbc4cfec06 (diff) |
Fix cursor position when scaling output with multiple monitors on monitor capture on x11
-rw-r--r-- | src/capture/kms.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/capture/kms.c b/src/capture/kms.c index fdb1ced..829fc6a 100644 --- a/src/capture/kms.c +++ b/src/capture/kms.c @@ -524,8 +524,8 @@ static void render_x11_cursor(gsr_capture_kms *self, gsr_color_conversion *color gsr_cursor_tick(&self->x11_cursor, DefaultRootWindow(self->params.egl->x11.dpy)); const vec2i cursor_pos = { - target_pos.x + (self->x11_cursor.position.x - self->x11_cursor.hotspot.x) * scale.x - capture_pos.x, - target_pos.y + (self->x11_cursor.position.y - self->x11_cursor.hotspot.y) * scale.y - capture_pos.y + target_pos.x + (self->x11_cursor.position.x - self->x11_cursor.hotspot.x - capture_pos.x) * scale.x, + target_pos.y + (self->x11_cursor.position.y - self->x11_cursor.hotspot.y - capture_pos.y) * scale.y }; self->params.egl->glEnable(GL_SCISSOR_TEST); |