Browse Source

Fix crash when connecting to OSC remote

Signed-off-by: falkTX <falktx@falktx.com>
tags/26.01
falkTX 5 months ago
parent
commit
9132ddb975
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 17 additions and 14 deletions
  1. +17
    -14
      src/override/Scene.cpp

+ 17
- 14
src/override/Scene.cpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2021-2025 Filipe Coelho <falktx@falktx.com>
* SPDX-License-Identifier: GPL-3.0-or-later
*/

@@ -207,20 +207,23 @@ void Scene::step() {
(internal->historyActionIndex != actionIndex
&& actionIndex > 0
&& time - internal->lastSceneChangeTime >= 1.0)) {
remoteDetails->first = false;

const std::string& name(APP->history->actions[actionIndex - 1]->name);
static const std::vector<std::string> ignoredNames = {
"move knob",
"move modules",
"move switch",
};
if (std::find(ignoredNames.cbegin(), ignoredNames.cend(), name) == ignoredNames.cend()) {
printf("action '%s'\n", APP->history->actions[actionIndex - 1]->name.c_str());
if (remoteDetails->first) {
remoteDetails->first = false;
remoteUtils::sendFullPatchToRemote(remoteDetails);

if (remoteDetails->screenshot) {
window::generateScreenshot();
} else {
const std::string& name(APP->history->actions[actionIndex - 1]->name);
static const std::vector<std::string> ignoredNames = {
"move knob",
"move modules",
"move switch",
};
if (std::find(ignoredNames.cbegin(), ignoredNames.cend(), name) == ignoredNames.cend()) {
d_debug("action '%s'\n", APP->history->actions[actionIndex - 1]->name.c_str());
remoteUtils::sendFullPatchToRemote(remoteDetails);

if (remoteDetails->screenshot) {
window::generateScreenshot();
}
}
}
internal->historyActionIndex = actionIndex;


Loading…
Cancel
Save