mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-26 19:26:04 -05:00
Add StopAllMacros() helper
This commit is contained in:
@@ -57,6 +57,7 @@ EXPORT bool CheckMacros();
|
||||
|
||||
EXPORT bool RunMacroActions(Macro *);
|
||||
EXPORT bool RunMacros();
|
||||
void StopAllMacros();
|
||||
|
||||
EXPORT void LoadMacros(obs_data_t *obj);
|
||||
EXPORT void SaveMacros(obs_data_t *obj);
|
||||
|
||||
@@ -1303,6 +1303,13 @@ bool RunMacros()
|
||||
return true;
|
||||
}
|
||||
|
||||
void StopAllMacros()
|
||||
{
|
||||
for (const auto &m : macros) {
|
||||
m->Stop();
|
||||
}
|
||||
}
|
||||
|
||||
Macro *GetMacroByName(const char *name)
|
||||
{
|
||||
for (const auto &m : macros) {
|
||||
|
||||
@@ -209,6 +209,7 @@ void SaveMacros(obs_data_t *obj);
|
||||
std::deque<std::shared_ptr<Macro>> &GetMacros();
|
||||
bool CheckMacros();
|
||||
bool RunMacros();
|
||||
void StopAllMacros();
|
||||
Macro *GetMacroByName(const char *name);
|
||||
Macro *GetMacroByQString(const QString &name);
|
||||
std::weak_ptr<Macro> GetWeakMacroByName(const char *name);
|
||||
|
||||
Reference in New Issue
Block a user