提交 694a6da7 编写于 作者: J jp9000

UI: Don't draw audio/transition sources in properties

上级 f33f8d8e
......@@ -109,7 +109,14 @@ OBSBasicFilters::OBSBasicFilters(QWidget *parent, OBSSource source_)
OBSBasicFilters::DrawPreview, this);
};
connect(ui->preview, &OBSQTDisplay::DisplayCreated, addDrawCallback);
enum obs_source_type type = obs_source_get_type(source);
uint32_t caps = obs_source_get_output_flags(source);
bool drawable_type = type == OBS_SOURCE_TYPE_INPUT ||
type == OBS_SOURCE_TYPE_SCENE;
if (drawable_type && (caps & OBS_SOURCE_VIDEO) != 0)
connect(ui->preview, &OBSQTDisplay::DisplayCreated,
addDrawCallback);
}
OBSBasicFilters::~OBSBasicFilters()
......
......@@ -103,7 +103,14 @@ OBSBasicProperties::OBSBasicProperties(QWidget *parent, OBSSource source_)
OBSBasicProperties::DrawPreview, this);
};
connect(preview.data(), &OBSQTDisplay::DisplayCreated, addDrawCallback);
enum obs_source_type type = obs_source_get_type(source);
uint32_t caps = obs_source_get_output_flags(source);
bool drawable_type = type == OBS_SOURCE_TYPE_INPUT ||
type == OBS_SOURCE_TYPE_SCENE;
if (drawable_type && (caps & OBS_SOURCE_VIDEO) != 0)
connect(preview.data(), &OBSQTDisplay::DisplayCreated,
addDrawCallback);
}
OBSBasicProperties::~OBSBasicProperties()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册