diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-04-09 16:06:39 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-04-09 16:06:39 +0200 |
commit | 7dcf3a68cc8027bfa0d865e8a33566b4ae431618 (patch) | |
tree | 9d770edd2920f16d4e9649f5dc126a5279508dc5 /src | |
parent | cb82677ae8e7b3d5ef35a36b7c6d88020959864c (diff) |
Use /usr/bin/gsr-kms-server constant path for pkexec
Diffstat (limited to 'src')
-rw-r--r-- | src/capture/kms_vaapi.c | 2 | ||||
-rw-r--r-- | src/main.cpp | 8 |
2 files changed, 1 insertions, 9 deletions
diff --git a/src/capture/kms_vaapi.c b/src/capture/kms_vaapi.c index 2e970a3..a369765 100644 --- a/src/capture/kms_vaapi.c +++ b/src/capture/kms_vaapi.c @@ -98,7 +98,7 @@ static int gsr_capture_kms_vaapi_start(gsr_capture *cap, AVCodecContext *video_c gsr_capture_kms_vaapi *cap_kms = cap->priv; // TODO: Allow specifying another card, and in other places (TODO: Use /dev/dri/renderD128?) - if(gsr_kms_client_init(&cap_kms->kms_client, "/dev/dri/card0", cap_kms->params.program_dir) != 0) { + if(gsr_kms_client_init(&cap_kms->kms_client, "/dev/dri/card0") != 0) { return -1; } diff --git a/src/main.cpp b/src/main.cpp index 9e4ae4e..489f800 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,8 +19,6 @@ extern "C" { #include <signal.h> #include <sys/stat.h> -#include <libgen.h> - #include "../include/sound.hpp" extern "C" { @@ -1111,11 +1109,6 @@ int main(int argc, char **argv) { if(argc == 0) usage(); - char *program_dir = dirname(argv[0]); - char program_dir_full[PATH_MAX]; - program_dir_full[0] = '\0'; - realpath(program_dir, program_dir_full); - //av_log_set_level(AV_LOG_TRACE); std::map<std::string, Arg> args = { @@ -1397,7 +1390,6 @@ int main(int argc, char **argv) { gsr_capture_kms_vaapi_params kms_params; kms_params.dpy = dpy; kms_params.display_to_capture = capture_target; - kms_params.program_dir = program_dir_full; capture = gsr_capture_kms_vaapi_create(&kms_params); if(!capture) return 1; |