From 076066af94a80b7c1305cd7a99cb2eb65e739b0e Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Sun, 3 Mar 2024 18:23:07 +0100 Subject: [PATCH 1/3] Save settings when switching to new macro This should ensure that settings are saved more frequently and less data is lost in case the plugin crashes with the settings dialog opened. --- lib/macro/macro-tab.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/macro/macro-tab.cpp b/lib/macro/macro-tab.cpp index d4407ebb1..62848f261 100644 --- a/lib/macro/macro-tab.cpp +++ b/lib/macro/macro-tab.cpp @@ -13,6 +13,7 @@ #include "utility.hpp" #include "version.h" +#include #include #include #include @@ -729,6 +730,7 @@ void AdvSceneSwitcher::MacroSelectionChanged() return; } SetEditMacro(*macro); + obs_frontend_save(); } void AdvSceneSwitcher::HighlightOnChange() From 1af74435b9c1ffab8b39b4f38e83c7147009c96f Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Sun, 3 Mar 2024 19:49:56 +0100 Subject: [PATCH 2/3] Fix crash when opening setting window --- lib/variables/variable-tab.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/variables/variable-tab.cpp b/lib/variables/variable-tab.cpp index 169bb301b..3abd5f0d6 100644 --- a/lib/variables/variable-tab.cpp +++ b/lib/variables/variable-tab.cpp @@ -102,7 +102,6 @@ static void removeVariableRow(QTableWidget *table, const QString &name) static void updateVaribleStatus(QTableWidget *table) { - auto lock = LockContext(); for (int row = 0; row < table->rowCount(); row++) { auto item = table->item(row, 0); if (!item) { From 099fa596e86c2651f119715074557993304732b4 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Sun, 3 Mar 2024 20:00:27 +0100 Subject: [PATCH 3/3] Fix output volume check of audio condition not working Only the percent based selection was not working properly since the calculation was off by a factor of 100. --- plugins/base/macro-condition-audio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/base/macro-condition-audio.cpp b/plugins/base/macro-condition-audio.cpp index f1bdfd414..2686a5d43 100644 --- a/plugins/base/macro-condition-audio.cpp +++ b/plugins/base/macro-condition-audio.cpp @@ -67,7 +67,7 @@ bool MacroConditionAudio::CheckOutputCondition() OBSSourceAutoRelease source = obs_weak_source_get_source(_audioSource.GetSource()); - double curVolume = _useDb ? _peak : DecibelToPercent(_peak); + double curVolume = _useDb ? _peak : DecibelToPercent(_peak) * 100; switch (_outputCondition) { case OutputCondition::ABOVE: