aboutsummaryrefslogtreecommitdiff
path: root/src/capture/kms_cuda.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-07-22 02:57:38 +0200
committerdec05eba <dec05eba@protonmail.com>2023-07-22 02:57:38 +0200
commit22a0a01553debd549e1f1f0058bc516cec28196b (patch)
tree3840935de5493e0633de18e55d0e26d4655546d3 /src/capture/kms_cuda.c
parentfc316750b81b870717e20cf00e09e0da159b1258 (diff)
AMD/Intel capture cursor
Diffstat (limited to 'src/capture/kms_cuda.c')
-rw-r--r--src/capture/kms_cuda.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/capture/kms_cuda.c b/src/capture/kms_cuda.c
index c1d272e..c6b207f 100644
--- a/src/capture/kms_cuda.c
+++ b/src/capture/kms_cuda.c
@@ -6,8 +6,6 @@
#include <stdio.h>
#include <unistd.h>
#include <assert.h>
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
#include <libavutil/hwcontext.h>
#include <libavutil/hwcontext_cuda.h>
#include <libavutil/frame.h>
@@ -260,7 +258,7 @@ static gsr_kms_response_fd* find_largest_drm(gsr_kms_response *kms_response) {
gsr_kms_response_fd *largest_drm = &kms_response->fds[0];
for(int i = 0; i < kms_response->num_fds; ++i) {
const int64_t size = (int64_t)kms_response->fds[i].width * (int64_t)kms_response->fds[i].height;
- if(size > largest_size) {
+ if(size > largest_size && !kms_response->fds[i].is_cursor) {
largest_size = size;
largest_drm = &kms_response->fds[i];
}