소스 검색

UI: Hide deprecated sources from add source popup menu

jp9000 9 년 전
부모
커밋
b8acca7cca
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  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)) {
 		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"));