UI: Allow temporarily disabling filter/source types
Implements the OBS_SOURCE_CAP_DISABLE capability flag in to the user interface.
This commit is contained in:
parent
da0e3ef0ee
commit
2de3973fae
@ -365,6 +365,8 @@ QMenu *OBSBasicFilters::CreateAddFilterPopupMenu(bool async)
|
||||
|
||||
if ((caps & OBS_SOURCE_DEPRECATED) != 0)
|
||||
continue;
|
||||
if ((caps & OBS_SOURCE_CAP_DISABLED) != 0)
|
||||
continue;
|
||||
|
||||
auto it = types.begin();
|
||||
for (; it != types.end(); ++it) {
|
||||
|
@ -4042,6 +4042,9 @@ QMenu *OBSBasic::CreateAddSourcePopupMenu()
|
||||
const char *name = obs_source_get_display_name(type);
|
||||
uint32_t caps = obs_get_source_output_flags(type);
|
||||
|
||||
if ((caps & OBS_SOURCE_CAP_DISABLED) != 0)
|
||||
continue;
|
||||
|
||||
if ((caps & OBS_SOURCE_DEPRECATED) == 0) {
|
||||
addSource(popup, type, name);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user