[obs] display DMABUF option but disable it on older OBS

This allows users to be aware that the option exists and they should upgrade.
This commit is contained in:
Quantum 2021-08-15 02:02:02 -04:00 committed by Geoffrey McRae
parent 8f5afe1848
commit c3f7327187

View File

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