main: Don't init render node with gpu disabled

Otherwise, a warning will be generated when there is no render node.
srht-ci
Andri Yngvason 2023-01-15 23:02:48 +00:00
parent 749b64666a
commit cec46490a9
1 changed files with 1 additions and 1 deletions

View File

@ -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