From 2bfe04465b79591b65f387104273d6a0a6a1ad88 Mon Sep 17 00:00:00 2001 From: Stephen Date: Sun, 17 Dec 2023 09:06:55 +0000 Subject: [PATCH] change default backend to direct and add egl to NVD_BACKEND options --- src/vabackend.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vabackend.c b/src/vabackend.c index ce6299c..c62b6bc 100644 --- a/src/vabackend.c +++ b/src/vabackend.c @@ -44,7 +44,7 @@ static FILE *LOG_OUTPUT; static int gpu = -1; static enum { EGL, DIRECT -} backend = EGL; +} backend = DIRECT; const NVFormatInfo formatsInfo[] = { @@ -93,8 +93,12 @@ static void init() { } char *nvdBackend = getenv("NVD_BACKEND"); - if (nvdBackend != NULL && strncmp(nvdBackend, "direct", 6) == 0) { - backend = DIRECT; + if (nvdBackend != NULL) { + if (strncmp(nvdBackend, "direct", 6) == 0) { + backend = DIRECT; + } else if (strncmp(nvdBackend, "egl", 6) == 0) { + backend = EGL; + } } //try to detect the Firefox sandbox and skip loading CUDA if detected