From cec46490a99a6281006554687594bc01d06a3135 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 15 Jan 2023 23:02:48 +0000 Subject: [PATCH] main: Don't init render node with gpu disabled Otherwise, a warning will be generated when there is no render node. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 34c6191..0d0666e 100644 --- a/src/main.c +++ b/src/main.c @@ -1428,7 +1428,7 @@ int main(int argc, char* argv[]) self.screencopy.enable_linux_dmabuf = enable_gpu_features; #ifdef ENABLE_SCREENCOPY_DMABUF - if (init_render_node(&drm_fd) < 0) { + if (enable_gpu_features && init_render_node(&drm_fd) < 0) { nvnc_log(NVNC_LOG_ERROR, "Failed to initialise DRM render node. No GPU acceleration will be available."); } #endif