aboutsummaryrefslogtreecommitdiff
path: root/src/capture/nvfbc.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-07-25 05:30:31 +0200
committerdec05eba <dec05eba@protonmail.com>2024-07-25 05:30:31 +0200
commitb7da16a9328285b108f33eb55a5fa33db8791bb7 (patch)
tree986caae8e6c0425e63596d4b53a3aa128f03dd18 /src/capture/nvfbc.c
parente107adbc32ebae14e6f0ae49338a95e8d31d9d84 (diff)
nvidia x11: fix screen-direct-force not working because it was ignored
Diffstat (limited to 'src/capture/nvfbc.c')
-rw-r--r--src/capture/nvfbc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/capture/nvfbc.c b/src/capture/nvfbc.c
index 97e0283..134480d 100644
--- a/src/capture/nvfbc.c
+++ b/src/capture/nvfbc.c
@@ -25,12 +25,8 @@ typedef struct {
bool capture_session_created;
gsr_cuda cuda;
- CUgraphicsResource cuda_graphics_resources[2];
- CUarray mapped_arrays[2];
- CUstream cuda_stream; // TODO: asdasdsa
NVFBC_TOGL_SETUP_PARAMS setup_params;
- bool direct_capture;
bool supports_direct_cursor;
bool capture_region;
uint32_t x, y, width, height;
@@ -258,15 +254,15 @@ static int gsr_capture_nvfbc_setup_session(gsr_capture_nvfbc *cap_nvfbc) {
memset(&create_capture_params, 0, sizeof(create_capture_params));
create_capture_params.dwVersion = NVFBC_CREATE_CAPTURE_SESSION_PARAMS_VER;
create_capture_params.eCaptureType = NVFBC_CAPTURE_TO_GL;
- create_capture_params.bWithCursor = (!cap_nvfbc->direct_capture || cap_nvfbc->supports_direct_cursor) ? NVFBC_TRUE : NVFBC_FALSE;
+ create_capture_params.bWithCursor = (!cap_nvfbc->params.direct_capture || cap_nvfbc->supports_direct_cursor) ? NVFBC_TRUE : NVFBC_FALSE;
if(!cap_nvfbc->params.record_cursor)
create_capture_params.bWithCursor = false;
if(cap_nvfbc->capture_region)
create_capture_params.captureBox = (NVFBC_BOX){ cap_nvfbc->x, cap_nvfbc->y, cap_nvfbc->width, cap_nvfbc->height };
create_capture_params.eTrackingType = cap_nvfbc->tracking_type;
create_capture_params.dwSamplingRateMs = (uint32_t)ceilf(1000.0f / (float)cap_nvfbc->params.fps);
- create_capture_params.bAllowDirectCapture = cap_nvfbc->direct_capture ? NVFBC_TRUE : NVFBC_FALSE;
- create_capture_params.bPushModel = cap_nvfbc->direct_capture ? NVFBC_TRUE : NVFBC_FALSE;
+ create_capture_params.bAllowDirectCapture = cap_nvfbc->params.direct_capture ? NVFBC_TRUE : NVFBC_FALSE;
+ create_capture_params.bPushModel = cap_nvfbc->params.direct_capture ? NVFBC_TRUE : NVFBC_FALSE;
create_capture_params.bDisableAutoModesetRecovery = true;
if(cap_nvfbc->tracking_type == NVFBC_TRACKING_OUTPUT)
create_capture_params.dwOutputId = cap_nvfbc->output_id;