From 0bd9cc44d30931e25b376950ac2b4c7413e43f06 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Sat, 9 Sep 2023 08:12:24 +0200 Subject: [PATCH] Only show slide show condition type if OBS supports necessary features --- src/macro-core/macro-condition-slideshow.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/macro-core/macro-condition-slideshow.cpp b/src/macro-core/macro-condition-slideshow.cpp index ea9b13f69..f605dd06b 100644 --- a/src/macro-core/macro-condition-slideshow.cpp +++ b/src/macro-core/macro-condition-slideshow.cpp @@ -6,10 +6,13 @@ namespace advss { const std::string MacroConditionSlideshow::id = "slideshow"; -bool MacroConditionSlideshow::_registered = MacroConditionFactory::Register( - MacroConditionSlideshow::id, - {MacroConditionSlideshow::Create, MacroConditionSlideshowEdit::Create, - "AdvSceneSwitcher.condition.slideshow"}); +bool MacroConditionSlideshow::_registered = + obs_get_version() >= MAKE_SEMANTIC_VERSION(29, 1, 0) && + MacroConditionFactory::Register( + MacroConditionSlideshow::id, + {MacroConditionSlideshow::Create, + MacroConditionSlideshowEdit::Create, + "AdvSceneSwitcher.condition.slideshow"}); static const std::map conditions = {