mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-05-06 15:00:43 +09:00
Only update cursor position in window capture if recording cursor
This commit is contained in:
@@ -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);
|
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?
|
// 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 = {
|
const vec2i cursor_pos = {
|
||||||
target_x + self->cursor.position.x - self->cursor.hotspot.x,
|
target_x + self->cursor.position.x - self->cursor.hotspot.x,
|
||||||
|
|||||||
Reference in New Issue
Block a user