Ignore a few more messages for resending patch to remote

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-01-01 21:00:31 +00:00
parent 2c3ab95472
commit 1ddcdee363
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
2 changed files with 8 additions and 1 deletions

View file

@ -266,6 +266,7 @@ native: $(TARGETS)
lv2: $(TARGETS)
$(MAKE) lv2 -C Cardinal
$(MAKE) lv2 -C CardinalFX $(CARDINAL_FX_ARGS)
$(MAKE) lv2 -C CardinalMini
$(MAKE) lv2 -C CardinalSynth $(CARDINAL_SYNTH_ARGS)
vst2: $(TARGETS)

View file

@ -45,6 +45,7 @@
#include "../CardinalCommon.hpp"
#include "../CardinalRemote.hpp"
#include <algorithm>
namespace rack {
namespace app {
@ -215,7 +216,12 @@ void Scene::step() {
internal->lastSceneChangeTime = time;
} else if (internal->historyActionIndex != actionIndex && actionIndex > 0 && time - internal->lastSceneChangeTime >= 1.0) {
const std::string& name(APP->history->actions[actionIndex - 1]->name);
if (/*std::abs(internal->historyActionIndex = actionIndex) > 1 ||*/ name != "move knob") {
static const std::vector<std::string> ignoredNames = {
"move knob",
"move module",
"move switch",
};
if (std::find(ignoredNames.cbegin(), ignoredNames.cend(), name) == ignoredNames.cend()) {
printf("action '%s'\n", APP->history->actions[actionIndex - 1]->name.c_str());
remoteUtils::sendFullPatchToRemote(remoteDetails);
window::generateScreenshot();