Răsfoiți Sursa

libobs: Warn/ignore if transitions use get_width/get_height

These functions aren't used with transition sources, and will be
ignored.
jp9000 9 ani în urmă
părinte
comite
03df6b2ceb
1 a modificat fișierele cu 8 adăugiri și 0 ștergeri
  1. 8 0
      libobs/obs-module.c

+ 8 - 0
libobs/obs-module.c

@@ -564,6 +564,14 @@ void obs_register_source_s(const struct obs_source_info *info, size_t size)
 	}
 
 	if (data.type == OBS_SOURCE_TYPE_TRANSITION) {
+		if (data.get_width)
+			source_warn("get_width ignored registering "
+					"transition '%s'",
+					data.id);
+		if (data.get_height)
+			source_warn("get_height ignored registering "
+					"transition '%s'",
+					data.id);
 		data.output_flags |= OBS_SOURCE_COMPOSITE | OBS_SOURCE_VIDEO |
 			OBS_SOURCE_CUSTOM_DRAW;
 	}