From 126dd49e2840daaa470dee7983cd5dcb05025635 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Fri, 6 Mar 2020 23:06:18 +0100 Subject: [PATCH] Fix finding the resource images on Windows OS --- vst/SfizzVstController.cpp | 2 ++ vst/SfizzVstEditor.cpp | 8 +++++++- vst/cmake/Vst3.cmake | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/vst/SfizzVstController.cpp b/vst/SfizzVstController.cpp index 77b71279..cc13b355 100644 --- a/vst/SfizzVstController.cpp +++ b/vst/SfizzVstController.cpp @@ -122,6 +122,8 @@ IPlugView* PLUGIN_API SfizzVstController::createView(FIDString _name) { ConstString name(_name); + fprintf(stderr, "[sfizz] about to create view: %s\n", _name); + if (name != Vst::ViewType::kEditor) return nullptr; diff --git a/vst/SfizzVstEditor.cpp b/vst/SfizzVstEditor.cpp index 422c1b01..826a8930 100644 --- a/vst/SfizzVstEditor.cpp +++ b/vst/SfizzVstEditor.cpp @@ -27,6 +27,8 @@ SfizzVstEditor::~SfizzVstEditor() bool PLUGIN_API SfizzVstEditor::open(void* parent, const VSTGUI::PlatformType& platformType) { + fprintf(stderr, "[sfizz] about to open view with parent %p\n", parent); + CRect wsize(0, 0, _logo.getWidth(), _logo.getHeight()); CFrame *frame = new CFrame(wsize, this); this->frame = frame; @@ -42,7 +44,11 @@ bool PLUGIN_API SfizzVstEditor::open(void* parent, const VSTGUI::PlatformType& p createFrameContents(); updateStateDisplay(); - frame->open(parent, platformType, config); + if (!frame->open(parent, platformType, config)) { + fprintf(stderr, "[sfizz] error opening frame\n"); + return false; + } + return true; } diff --git a/vst/cmake/Vst3.cmake b/vst/cmake/Vst3.cmake index fb89987c..a8aa9074 100644 --- a/vst/cmake/Vst3.cmake +++ b/vst/cmake/Vst3.cmake @@ -254,4 +254,6 @@ function(plugin_add_vstgui NAME) target_include_directories("${NAME}" PRIVATE external/steinberg/src) + + target_compile_definitions("${NAME}" PRIVATE "SMTG_MODULE_IS_BUNDLE=1") endfunction()