提交 eac55edc 编写于 作者: J jp9000

libobs: Add obs_source_showing function

This allows the ability to see whether the source is being displayed
somewhere (though not necessarily active in the main output)
上级 fd8f8cfd
......@@ -2064,6 +2064,11 @@ bool obs_source_active(const obs_source_t *source)
return source ? source->activate_refs != 0 : false;
}
bool obs_source_showing(const obs_source_t *source)
{
return source ? source->show_refs != 0 : false;
}
static inline void signal_flags_updated(obs_source_t *source)
{
struct calldata data = {0};
......
......@@ -735,6 +735,11 @@ EXPORT void obs_source_enum_tree(obs_source_t *source,
/** Returns true if active, false if not */
EXPORT bool obs_source_active(const obs_source_t *source);
/**
* Returns true if currently displayed somewhere (active or not), false if not
*/
EXPORT bool obs_source_showing(const obs_source_t *source);
/**
* Sometimes sources need to be told when to save their settings so they
* don't have to constantly update and keep track of their settings. This will
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册