Browse Source

UI: Hide deprecated sources from add source popup menu

jp9000 9 years ago
parent
commit
b8acca7cca
1 changed files with 5 additions and 2 deletions
  1. 5 2
      UI/window-basic-main.cpp

+ 5 - 2
UI/window-basic-main.cpp

@@ -3212,9 +3212,12 @@ QMenu *OBSBasic::CreateAddSourcePopupMenu()
 
 
 	while (obs_enum_input_types(idx++, &type)) {
 	while (obs_enum_input_types(idx++, &type)) {
 		const char *name = obs_source_get_display_name(type);
 		const char *name = obs_source_get_display_name(type);
+		uint32_t caps = obs_get_source_output_flags(type);
 
 
-		addSource(popup, type, name);
-		foundValues = true;
+		if ((caps & OBS_SOURCE_DEPRECATED) == 0) {
+			addSource(popup, type, name);
+			foundValues = true;
+		}
 	}
 	}
 
 
 	addSource(popup, "scene", Str("Basic.Scene"));
 	addSource(popup, "scene", Str("Basic.Scene"));