aboutsummaryrefslogtreecommitdiff
path: root/src/capture/kms_cuda.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-07-22 04:12:02 +0200
committerdec05eba <dec05eba@protonmail.com>2023-07-22 04:12:02 +0200
commit60de2c47bef3f6ad805c3d0ec0cffa217149e525 (patch)
treec3f0c4cfe9279c4cbf03d7b8f52b6fa2248dc1dc /src/capture/kms_cuda.c
parent22a0a01553debd549e1f1f0058bc516cec28196b (diff)
Use correct offset for combined plane monitor capture
Diffstat (limited to 'src/capture/kms_cuda.c')
-rw-r--r--src/capture/kms_cuda.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/capture/kms_cuda.c b/src/capture/kms_cuda.c
index c6b207f..e7a2a1f 100644
--- a/src/capture/kms_cuda.c
+++ b/src/capture/kms_cuda.c
@@ -333,6 +333,11 @@ static int gsr_capture_kms_cuda_capture(gsr_capture *cap, AVFrame *frame) {
cap_kms->wayland_kms_data.modifier = cap_kms->params.egl->modifier;
cap_kms->wayland_kms_data.connector_id = 0;
cap_kms->wayland_kms_data.is_combined_plane = false;
+ cap_kms->wayland_kms_data.is_cursor = false;
+ cap_kms->wayland_kms_data.x = cap_kms->wayland_kms_data.x; // TODO: Use these
+ cap_kms->wayland_kms_data.y = cap_kms->wayland_kms_data.y;
+ cap_kms->wayland_kms_data.src_w = cap_kms->wayland_kms_data.width;
+ cap_kms->wayland_kms_data.src_h = cap_kms->wayland_kms_data.height;
if(cap_kms->wayland_kms_data.fd <= 0)
return -1;
@@ -369,8 +374,6 @@ static int gsr_capture_kms_cuda_capture(gsr_capture *cap, AVFrame *frame) {
if(!drm_fd)
return -1;
- //bool capture_is_combined_plane = drm_fd->is_combined_plane || ((int)drm_fd->width == cap_kms->screen_size.x && (int)drm_fd->height == cap_kms->screen_size.y);
-
const intptr_t img_attr[] = {
//EGL_IMAGE_PRESERVED_KHR, EGL_TRUE,
EGL_LINUX_DRM_FOURCC_EXT, fourcc('A', 'R', '2', '4'),//cap_kms->params.egl->pixel_format, ARGB8888