From 2bc05a4a7fc2e2ea2ae264e440a6d93a79217d51 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 6 Jul 2024 02:29:07 +0200 Subject: Minor nvfbc --- src/capture/nvfbc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/capture/nvfbc.c') diff --git a/src/capture/nvfbc.c b/src/capture/nvfbc.c index 9c7a041..97e0283 100644 --- a/src/capture/nvfbc.c +++ b/src/capture/nvfbc.c @@ -326,15 +326,14 @@ static int gsr_capture_nvfbc_start(gsr_capture *cap, AVCodecContext *video_codec cap_nvfbc->capture_region = (cap_nvfbc->x > 0 || cap_nvfbc->y > 0 || cap_nvfbc->width > 0 || cap_nvfbc->height > 0); cap_nvfbc->supports_direct_cursor = false; - bool direct_capture = cap_nvfbc->params.direct_capture; int driver_major_version = 0; int driver_minor_version = 0; - if(direct_capture && get_driver_version(&driver_major_version, &driver_minor_version)) { + if(cap_nvfbc->params.direct_capture && get_driver_version(&driver_major_version, &driver_minor_version)) { fprintf(stderr, "Info: detected nvidia version: %d.%d\n", driver_major_version, driver_minor_version); // TODO: if(version_at_least(driver_major_version, driver_minor_version, 515, 57) && version_less_than(driver_major_version, driver_minor_version, 520, 56)) { - direct_capture = false; + cap_nvfbc->params.direct_capture = false; fprintf(stderr, "Warning: \"screen-direct\" has temporary been disabled as it causes stuttering with driver versions >= 515.57 and < 520.56. Please update your driver if possible. Capturing \"screen\" instead.\n"); } @@ -343,7 +342,7 @@ static int gsr_capture_nvfbc_start(gsr_capture *cap, AVCodecContext *video_codec /* if(direct_capture) { if(version_at_least(driver_major_version, driver_minor_version, 515, 57)) - supports_direct_cursor = true; + cap_nvfbc->supports_direct_cursor = true; else fprintf(stderr, "Info: capturing \"screen-direct\" but driver version appears to be less than 515.57. Disabling capture of cursor. Please update your driver if you want to capture your cursor or record \"screen\" instead.\n"); } -- cgit v1.2.3