diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-07-05 01:59:04 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-07-05 10:33:47 +0200 |
commit | b9fa7f2fa25ee37c87077bce468c95e48fce5c18 (patch) | |
tree | 3aff293110d8405e8057edb9c757f6e630c22de2 /src/cuda.c | |
parent | 62d61fda12e3774fee6b671e44fb89bd2ef8da8c (diff) |
Separate video encoding method from capture method
With this instead of kms_cuda/kms_vaapi/kms_software and
xcomposite_cuda/xcomposite_vaapi/xcomposite_software there
is now only kms and xcomposite.
Diffstat (limited to 'src/cuda.c')
-rw-r--r-- | src/cuda.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -19,7 +19,7 @@ bool gsr_cuda_load(gsr_cuda *self, Display *display, bool do_overclock) { } } - dlsym_assign required_dlsym[] = { + const dlsym_assign required_dlsym[] = { { (void**)&self->cuInit, "cuInit" }, { (void**)&self->cuDeviceGetCount, "cuDeviceGetCount" }, { (void**)&self->cuDeviceGet, "cuDeviceGet" }, @@ -82,12 +82,13 @@ bool gsr_cuda_load(gsr_cuda *self, Display *display, bool do_overclock) { goto fail; } - if(self->do_overclock) { - assert(display); + if(self->do_overclock && display) { if(gsr_overclock_load(&self->overclock, display)) gsr_overclock_start(&self->overclock); else fprintf(stderr, "gsr warning: gsr_cuda_load: failed to load xnvctrl, failed to overclock memory transfer rate\n"); + } else if(self->do_overclock && !display) { + fprintf(stderr, "gsr warning: gsr_cuda_load: overclocking enabled but no X server is running. Overclocking has been disabled\n"); } self->library = lib; |