diff --git a/dpf b/dpf index e512b25..1bab226 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit e512b25281af5887033dae4bfb1c10c40c18fde7 +Subproject commit 1bab2267628ec5c58e8b41d9df4f346bbde3545a diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index b946ef7..43c3545 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -29,6 +29,7 @@ #include "AsyncDialog.hpp" #include "PluginContext.hpp" +#include "DistrhoPluginUtils.hpp" #include #include @@ -58,6 +59,11 @@ namespace settings { int rateLimit = 0; } +bool isStandalone() +{ + return std::strstr(getPluginFormatName(), "JACK") != nullptr; +} + #ifdef ARCH_WIN std::string getSpecialPath(const SpecialPath type) { diff --git a/src/CardinalCommon.hpp b/src/CardinalCommon.hpp index 961c340..e7584c8 100644 --- a/src/CardinalCommon.hpp +++ b/src/CardinalCommon.hpp @@ -41,6 +41,8 @@ namespace window { void generateScreenshot(); } +bool isStandalone(); + #ifdef ARCH_WIN enum SpecialPath { kSpecialPathUserProfile, diff --git a/src/override/Scene.cpp b/src/override/Scene.cpp index 82f09e3..03c4354 100644 --- a/src/override/Scene.cpp +++ b/src/override/Scene.cpp @@ -127,7 +127,7 @@ struct ResizeHandle : widget::OpaqueWidget { struct Scene::Internal { - ResizeHandle* resizeHandle; + ResizeHandle* resizeHandle = nullptr; bool heldArrowKeys[4] = {}; @@ -173,6 +173,9 @@ Scene::Scene() { browser->hide(); addChild(browser); + if (isStandalone()) + return; + internal->resizeHandle = new ResizeHandle; internal->resizeHandle->box.size = math::Vec(16, 16); addChild(internal->resizeHandle); @@ -200,7 +203,8 @@ void Scene::step() { rackScroll->box.pos.y = menuBar->box.size.y; } - internal->resizeHandle->box.pos = box.size.minus(internal->resizeHandle->box.size); + if (internal->resizeHandle != nullptr) + internal->resizeHandle->box.pos = box.size.minus(internal->resizeHandle->box.size); // Resize owned descendants menuBar->box.size.x = box.size.x;