From c3f7327187fbec8799f214ce2ce8b7ec4b98dcef Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 15 Aug 2021 02:02:02 -0400 Subject: [PATCH] [obs] display DMABUF option but disable it on older OBS This allows users to be aware that the option exists and they should upgrade. --- obs/lg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/obs/lg.c b/obs/lg.c index 0959f011..66acaa5a 100644 --- a/obs/lg.c +++ b/obs/lg.c @@ -206,6 +206,10 @@ static obs_properties_t * lgGetProperties(void * data) obs_properties_add_text(props, "shmFile", obs_module_text("SHM File"), OBS_TEXT_DEFAULT); #if LIBOBS_API_MAJOR_VER >= 27 obs_properties_add_bool(props, "dmabuf", obs_module_text("Use DMABUF import (requires kvmfr device)")); +#else + obs_property_t * dmabuf = obs_properties_add_bool(props, "dmabuf", + obs_module_text("Use DMABUF import (requires OBS 27+ and kvmfr device)")); + obs_property_set_enabled(dmabuf, false); #endif return props;