Fix a few details of mini version, show mini demo patches

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-02-19 19:25:57 +01:00
parent 5f3ce7471f
commit 30941542d3
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
3 changed files with 7 additions and 9 deletions

View file

@ -347,8 +347,6 @@ public:
rack::contextSet(context); rack::contextSet(context);
#if CARDINAL_VARIANT_MINI #if CARDINAL_VARIANT_MINI
DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote());
// create unique temporary path for this instance // create unique temporary path for this instance
try { try {
char uidBuf[24]; char uidBuf[24];
@ -403,6 +401,8 @@ public:
context->patch->loadTemplate(); context->patch->loadTemplate();
context->scene->rackScroll->reset(); context->scene->rackScroll->reset();
DISTRHO_SAFE_ASSERT(remoteUtils::connectToRemote());
Engine_setRemoteDetails(context->engine, remoteDetails); Engine_setRemoteDetails(context->engine, remoteDetails);
#endif #endif

View file

@ -101,15 +101,16 @@ struct MenuButton : ui::Button {
struct FileButton : MenuButton { struct FileButton : MenuButton {
const bool isStandalone; const bool isStandalone;
#if ! CARDINAL_VARIANT_MINI
std::vector<std::string> demoPatches; std::vector<std::string> demoPatches;
#endif
FileButton(const bool standalone) FileButton(const bool standalone)
: MenuButton(), isStandalone(standalone) : MenuButton(), isStandalone(standalone)
{ {
#if ! CARDINAL_VARIANT_MINI #if CARDINAL_VARIANT_MINI
const std::string patchesDir = asset::patchesPath() + DISTRHO_OS_SEP_STR "mini";
#else
const std::string patchesDir = asset::patchesPath() + DISTRHO_OS_SEP_STR "examples"; const std::string patchesDir = asset::patchesPath() + DISTRHO_OS_SEP_STR "examples";
#endif
if (system::isDirectory(patchesDir)) if (system::isDirectory(patchesDir))
{ {
@ -118,7 +119,6 @@ struct FileButton : MenuButton {
return string::lowercase(a) < string::lowercase(b); return string::lowercase(a) < string::lowercase(b);
}); });
} }
#endif
} }
void onAction(const ActionEvent& e) override { void onAction(const ActionEvent& e) override {
@ -211,7 +211,6 @@ struct FileButton : MenuButton {
#endif #endif
#endif #endif
#if ! CARDINAL_VARIANT_MINI
if (!demoPatches.empty()) if (!demoPatches.empty())
{ {
menu->addChild(new ui::MenuSeparator); menu->addChild(new ui::MenuSeparator);
@ -237,7 +236,6 @@ struct FileButton : MenuButton {
})); }));
})); }));
} }
#endif
#ifndef DISTRHO_OS_WASM #ifndef DISTRHO_OS_WASM
if (isStandalone) { if (isStandalone) {

View file

@ -218,7 +218,7 @@ void Scene::step() {
const std::string& name(APP->history->actions[actionIndex - 1]->name); const std::string& name(APP->history->actions[actionIndex - 1]->name);
static const std::vector<std::string> ignoredNames = { static const std::vector<std::string> ignoredNames = {
"move knob", "move knob",
"move module", "move modules",
"move switch", "move switch",
}; };
if (std::find(ignoredNames.cbegin(), ignoredNames.cend(), name) == ignoredNames.cend()) { if (std::find(ignoredNames.cbegin(), ignoredNames.cend(), name) == ignoredNames.cend()) {