[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 authored and Geoffrey McRae committed 2021-08-15 18:01:15 +10:00
1 parent 8f5afe1848
commit c3f7327187
1 file changed
+4
+4
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;