Skip to content

Commit

Permalink
Update to latest carla, dpf, and pugl, needs testing
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed May 28, 2022
1 parent 11d9d6a commit bcd1b9e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 30 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ carla:
ifneq ($(STATIC_BUILD),true)
$(MAKE) static-plugin -C carla $(CARLA_EXTRA_ARGS) \
CAN_GENERATE_LV2_TTL=false \
STATIC_PLUGIN_TARGET=true
CUSTOM_DPF_PATH=$(CURDIR)/dpf \
STATIC_PLUGIN_TARGET=true \
USING_CUSTOM_DPF=true
endif

deps:
Expand Down
2 changes: 1 addition & 1 deletion carla
6 changes: 0 additions & 6 deletions jucewrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ set_property(TARGET native_plugins PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_
add_library(audio_decoder STATIC IMPORTED)
set_property(TARGET audio_decoder PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/audio_decoder.a")

add_library(carla_dgl STATIC IMPORTED)
set_property(TARGET carla_dgl PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/dgl.a")

add_library(jackbridge STATIC IMPORTED)
set_property(TARGET jackbridge PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../carla/build/modules/Release/jackbridge.min.a")

Expand Down Expand Up @@ -173,7 +170,6 @@ target_link_libraries(Cardinal
carla_plugin
native_plugins
audio_decoder
carla_dgl
jackbridge
lilv
rtmempool
Expand Down Expand Up @@ -264,7 +260,6 @@ target_link_libraries(CardinalFX
carla_plugin
native_plugins
audio_decoder
carla_dgl
jackbridge
lilv
rtmempool
Expand Down Expand Up @@ -355,7 +350,6 @@ target_link_libraries(CardinalSynth
carla_plugin
native_plugins
audio_decoder
carla_dgl
jackbridge
lilv
rtmempool
Expand Down
2 changes: 1 addition & 1 deletion plugins/Cardinal/src/plugincontext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "DistrhoUtils.hpp"

#ifndef HEADLESS
# include "dgl/Base.hpp"
# include "../dgl/Base.hpp"
#else
# include "extra/LeakDetector.hpp"
#endif
Expand Down
30 changes: 13 additions & 17 deletions src/CardinalUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,8 @@ GLFWAPI const char* glfwGetClipboardString(GLFWwindow*)
DISTRHO_SAFE_ASSERT_RETURN(context != nullptr, nullptr);
DISTRHO_SAFE_ASSERT_RETURN(context->ui != nullptr, nullptr);

const char* mimeType = nullptr;
size_t dataSize = 0;

if (const void* const clipboard = context->ui->getClipboard(mimeType, dataSize))
{
if (mimeType == nullptr || std::strcmp(mimeType, "text/plain") != 0)
return nullptr;
return static_cast<const char*>(clipboard);
}

return nullptr;
size_t dataSize;
return static_cast<const char*>(context->ui->getClipboard(dataSize));
}

GLFWAPI void glfwSetClipboardString(GLFWwindow*, const char* const text)
Expand Down Expand Up @@ -268,7 +259,6 @@ class CardinalUI : public CardinalBaseUI,
{
if (context->window != nullptr)
WindowParametersSave(context->window);
rack::contextSet(nullptr);
}
};

Expand Down Expand Up @@ -619,13 +609,8 @@ class CardinalUI : public CardinalBaseUI,
switch (ev.button)
{
case 1: button = GLFW_MOUSE_BUTTON_LEFT; break;
#ifdef DISTRHO_OS_MAC
case 2: button = GLFW_MOUSE_BUTTON_RIGHT; break;
case 3: button = GLFW_MOUSE_BUTTON_MIDDLE; break;
#else
case 2: button = GLFW_MOUSE_BUTTON_MIDDLE; break;
case 3: button = GLFW_MOUSE_BUTTON_RIGHT; break;
#endif
default:
button = ev.button;
break;
Expand Down Expand Up @@ -778,6 +763,17 @@ class CardinalUI : public CardinalBaseUI,
setState("windowSize", sizeString);
}

uint32_t uiClipboardDataOffer() override
{
const std::vector<ClipboardDataOffer> offers(getClipboardDataOfferTypes());

for (const ClipboardDataOffer offer : offers)
if (std::strcmp(offer.type, "text/plain") == 0)
return offer.id;

return 0;
}

void uiFocus(const bool focus, const CrossingMode mode) override
{
if (focus)
Expand Down
3 changes: 0 additions & 3 deletions src/Makefile.cardinal.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/carla_engine_
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/carla_plugin.a
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/native-plugins.a
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/audio_decoder.a
ifneq ($(HEADLESS),true)
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/dgl.a
endif
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/jackbridge.min.a
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/lilv.a
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/rtmempool.a
Expand Down

0 comments on commit bcd1b9e

Please sign in to comment.