Add option to for macro condition scene to trigger on any scene change

This commit is contained in:
WarmUpTill
2021-09-02 19:52:42 +02:00
committed by WarmUpTill
parent 96b472776a
commit bee75336d0
5 changed files with 35 additions and 9 deletions

View File

@@ -8,6 +8,7 @@
enum class SceneType {
CURRENT,
PREVIOUS,
CHANGED,
};
class MacroConditionScene : public MacroCondition {
@@ -26,6 +27,7 @@ public:
SceneType _type;
private:
std::chrono::high_resolution_clock::time_point _lastSceneChangeTime{};
static bool _registered;
static const std::string id;
};
@@ -58,5 +60,6 @@ protected:
std::shared_ptr<MacroConditionScene> _entryData;
private:
void SetWidgetVisibility();
bool _loading = true;
};

View File

@@ -79,6 +79,7 @@ struct SwitcherData {
obs_source_t *waitScene = nullptr;
OBSWeakSource currentScene = nullptr;
OBSWeakSource previousScene = nullptr;
std::chrono::high_resolution_clock::time_point lastSceneChangeTime{};
OBSWeakSource lastRandomScene;
SceneGroup *lastRandomSceneGroup;
OBSWeakSource nonMatchingScene;