diff options
| author | dec05eba <dec05eba@protonmail.com> | 2026-05-14 17:36:59 +0200 |
|---|---|---|
| committer | dec05eba <dec05eba@protonmail.com> | 2026-05-14 17:36:59 +0200 |
| commit | ea1bbfcfe22b736a940711db86a9c0f8b255e9f1 (patch) | |
| tree | 5298e17956e0d811eafcbe2808f3f2b93c9eea25 /src | |
| parent | 3cd3647e23dc2cba50bb17875e5edefeaafa15cb (diff) | |
Fix vulkan video encoding on nvidia x11 when capturing a monitor
Diffstat (limited to 'src')
| -rw-r--r-- | src/egl.c | 1 | ||||
| -rw-r--r-- | src/main.cpp | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -446,7 +446,6 @@ bool gsr_egl_load(gsr_egl *self, gsr_window *window, bool is_monitor_capture, bo /* Nvfbc requires glx */ if(gsr_window_get_display_server(self->window) == GSR_DISPLAY_SERVER_X11 && is_monitor_capture && self->gpu_info.vendor == GSR_GPU_VENDOR_NVIDIA) { self->context_type = GSR_GL_CONTEXT_TYPE_GLX; - self->dri_card_path = NULL; if(!gsr_egl_switch_to_glx_context(self)) goto fail; } diff --git a/src/main.cpp b/src/main.cpp index df96152..5eae367 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1912,6 +1912,8 @@ static WindowingSetup setup_windowing(bool setup_egl) { fprintf(stderr, "gsr error: no /dev/dri/cardX device found. Make sure that you have at least one monitor connected\n"); setup.list_monitors = false; } + } else { + gsr_get_valid_card_path(&setup.egl, setup.egl.card_path, false); } } @@ -3836,6 +3838,8 @@ int main(int argc, char **argv) { fprintf(stderr, "gsr error: no /dev/dri/cardX device found. Make sure that you have at least one monitor connected or record a single window instead on X11 or record with the -w portal option\n"); _exit(2); } + } else { + gsr_get_valid_card_path(&egl, egl.card_path, false); } memset(&x11_cursor, 0, sizeof(x11_cursor)); |
