diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-07-18 07:06:12 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-07-18 07:06:12 +0200 |
commit | 585382cf18f566d7555922e8966701ba297a5a4a (patch) | |
tree | 6951e2fae7ff5b4b53877f1d90f80d0770fd4165 /src/capture/kms_vaapi.c | |
parent | a3beaeb0cc501f654b0b31a52cdc3d9009235aaa (diff) |
More kms vaapi allow to work without xwayland
Diffstat (limited to 'src/capture/kms_vaapi.c')
-rw-r--r-- | src/capture/kms_vaapi.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/capture/kms_vaapi.c b/src/capture/kms_vaapi.c index 69b9d94..54b8816 100644 --- a/src/capture/kms_vaapi.c +++ b/src/capture/kms_vaapi.c @@ -576,7 +576,9 @@ static int gsr_capture_kms_vaapi_capture(gsr_capture *cap, AVFrame *frame) { } } - gsr_cursor_tick(&cap_kms->cursor); + if(cap_kms->dpy) { + gsr_cursor_tick(&cap_kms->cursor); + } vec2i capture_pos = cap_kms->capture_pos; vec2i capture_size = cap_kms->capture_size; @@ -591,10 +593,12 @@ static int gsr_capture_kms_vaapi_capture(gsr_capture *cap, AVFrame *frame) { capture_pos, capture_size, texture_rotation); - gsr_color_conversion_draw(&cap_kms->color_conversion, cap_kms->cursor.texture_id, - cursor_capture_pos, (vec2i){cap_kms->cursor.size.x, cap_kms->cursor.size.y}, - (vec2i){0, 0}, (vec2i){cap_kms->cursor.size.x, cap_kms->cursor.size.y}, - 0.0f); + if(cap_kms->dpy) { + gsr_color_conversion_draw(&cap_kms->color_conversion, cap_kms->cursor.texture_id, + cursor_capture_pos, (vec2i){cap_kms->cursor.size.x, cap_kms->cursor.size.y}, + (vec2i){0, 0}, (vec2i){cap_kms->cursor.size.x, cap_kms->cursor.size.y}, + 0.0f); + } cap_kms->egl.eglSwapBuffers(cap_kms->egl.egl_display, cap_kms->egl.egl_surface); |